SQL Anywhere Bug Fix Readme for Version 8.0.2, build 4513


Contents




Description of different download types

Express Bug Fixes

A subset of the software with one or more bug fixes. The bug fixes are listed below. A Bug Fix update may only be applied to installed software with the same version number. Moderate testing has been performed on the software, but full testing has not been performed. Customers are encouraged to verify the suitability of the software before releasing it into a production environment.

Maintenance Release

A complete set of software that upgrades installed software from an older version with the same major version number (version number format is major.minor.patch). Bug fixes and other changes are listed in the "readme" file for the upgrade. For answers to commonly asked questions please use the following link: Frequently asked Questions



8.0.2 Critical Bug Fixes

This section contains a description of critical bug fixes made since the release
of version 8.0.2.  If any of these bug fixes appear to affect your installation,
iAnywhere strongly recommends that you install this EBF.


Adaptive Server Anywhere - ODBC Client Library

================(Build #4429 - Engineering Case #357228)================ When using a database with the UTF8 collation, statements containing non-English characters could fail with the error "Syntax error or access violation", and Unicode bound data stored in the database could be corrupted. This problem would affect any application using ODBC or OLEDB, including Java-based applications using the JDBC-ODBC bridge (8.0) or iAnywhere JDBC Driver (9.0), including DBISQL and Sybase Central. dbmlsync was also affected. The bug was introduced in the following versions and builds: 8.0.2 build 4409 9.0.0 build 1302 9.0.1 build 1852 This problem has been fixed.

Adaptive Server Anywhere - OLEDB Client Library

================(Build #4429 - Engineering Case #357700)================ When using a database with the UTF8 collation, statements containing non-English characters could fail with the error "Syntax error or access violation", and Unicode bound data stored in the database could be corrupted. This problem would affect any application using ODBC or OLEDB, including Java-based applications using the JDBC-ODBC bridge (8.0) or iAnywhere JDBC Driver (9.0), including DBISQL and Sybase Central. dbmlsync was also affected. The bug was introduced in the following versions and builds: 8.0.2 build 4409 9.0.0 build 1302 9.0.1 build 1852 This problem has been fixed.

Adaptive Server Anywhere - Server

================(Build #4319 - Engineering Case #333024)================ The server could have failed with the error "Fatal error: Unknown device error", or corrupted a table, when updating a large row with a page size larger than 4K. This would only have occurred if the update statement was making the row larger than 4K. As a result of the corruption, rows could have gone missing. This has been fixed. Note, this fix does not recover lost or corrupted rows. ================(Build #4320 - Engineering Case #332963)================ When backing up a database using the BACKUP DATABASE statement with the TRANSACTION LOG TRUNCATE option, both the database and log file are backed up and then the current log file is truncated. If there were transactions occurring at the time of the backup, then these transactions can begin in the backed up log and then continue into the current log file once it has been truncated and the backup is complete, as transactions can span log files when using a database created with version 8.0.0 or higher. The proper way to recover from this backup is to start with the backup database and then apply the backup log file followed by the current log file. However, this would not have succeeded, when applying the logs in this way the error "Cannot open transaction log file -- Can't use log file 'log file name' since it has been used more recently than the database" would always have been displayed when applying the current log file. This occurred because the starting offset of the current log was not updated correctly when the backup finished. Unfortunately, applying the logs incorrectly might have actually worked. For example, if instead of applying the backup log to the backup database first, the current log file was applied to the backup database, it would have applied successfully. Again this is because the log offsets were not correctly updated. This was unfortunate, since all of the transactions that were in the backup log at the time the backup would have been lost. This has now been fixed, the log offset of the current log file is now updated properly when using the BACKUP DATABASE statement with the TRANSACTION LOG TRUNCATE option. This problem would not have occurred when using dbbackup.exe. ================(Build #4414 - Engineering Case #351733)================ If a transaction deleted rows from a table concurrently with another transaction inserting rows, there was a chance of database corruption. While this was more likely to occur on multiprocessor and Unix systems, it was still possible for it to have occurred on single processor and Windows systems. Corruption was also possible solely with concurrent deletes, but only in very rare circumstances. This has been corrected. ================(Build #4448 - Engineering Case #361509)================ Servers running on Windows systems, other than Windows 95, could have experienced database corruption if the system crashed due to an OS or hardware problem (or it was powered off unexpectedly), and write caching was enabled on the drive containing the database files. A work around would be to disable write caching in the Device Manager, via the Disk Properties tab in the Properties dialog, for the drives in question. (This might be necessary in any case for IDE drives). ================(Build #4494 - Engineering Case #370998)================ The problem addressed by changes for Engineering Case 323973, was reintroduced by the changes for Case 369727. A server crash at an inopportune moment could have resulted in a corrupt database. This was more likely to have occurred with 9.x servers, and with 8.x servers running 8.x databases. It was unlikely to have occurred with 8.x and earlier servers when running against 7.x or earlier databases. This has now been fixed.

SQL Remote for Adaptive Server Anywhere - Database Tools Interface

================(Build #4321 - Engineering Case #333477)================ Any transactions applied with a connection, say X, may not be replicated by SQL Remote in the next replication, if the message receiving thread (or phase) of SQL Remote had received, applied, and committed all the incoming messages on connection X and the online transaction log was renamed before connection X was terminated. This has now been fixed.



8.0.2 Bug Fixes (also see Critical Bug fixes)

This section contains a description of bug fixes made since the release
of version 8.0.2.


Adaptive Server Anywhere - ADO.Net Managed Provider

================(Build #4233 - Engineering Case #313686)================ If a stored prcedure executed a RAISERROR statement to signal a user defined error, the provider would not have returned the exception to the application. Instead, the application would have received the error "object reference not set to instance of an object". The correct RAISERROR message will now be returned. ================(Build #4233 - Engineering Case #313788)================ When using the Managed provider, columns with a TIME datatype are mapped to .NET TimeSpan DataRows when VS.NET generates strong-typed DataSet classes for XSD files. The provider was failing to fill the DataSet because the it was returning DateTime values for the TIME columns and TimeSpan values could be cast to DateTime values. This was fixed by converting TIME columns to TimeSpan values and adding a new method GetTimeSpan to the AsaDataReader class. ================(Build #4233 - Engineering Case #313797)================ An InvalidCastException would have been thrown by the .NET Common Language Runtime when generating an UPDATE command that had a SELECT sub-querey which returned decimal columns. This has been fixed. ================(Build #4233 - Engineering Case #313803)================ When executing a parameterized query to insert a row into a table, if a parameter value was of type DECIMAL and the precision was not specified, an incorrect value was inserted into the table. Fixed by setting the precision to 30 for decimal values with an unspecified precision. ================(Build #4240 - Engineering Case #315667)================ When a Smart Device application, that had opened a Data Reader, terminates without closing the connection or the Data Reader, a managed AsaException and a native exception would have occurred. This is now fixed by closing the Data Reader when the connection is closed. ================(Build #4240 - Engineering Case #316908)================ The version number reported by the Managed Provider dll did not contain the build number. The number displayed was always 8.0.2.0. This has now been fixed to also display the build number. ================(Build #4244 - Engineering Case #316467)================ If ExecuteNonQuery was called in an ASACommand object to drop a table that didn't exist, an error would have occurred. After that the AsaCommand object could no longer have been used. This has now been fixed. ================(Build #4250 - Engineering Case #317705)================ A System.InvalidCastException was thrown when calling AsaDataAdapter.Fill, if a column value was null and the type of the corresponding DataColumn was different from the type of the database column. Fixed by returning a DBNull.Value if the column is null. ================(Build #4253 - Engineering Case #318823)================ A NullReferenceException would have been thrown when creating a new connection if dbdata8.dll was not found in the iAnywhere.Data.AsaClient.dll's directory or the application's working directory and the registry key(HKEY_LOCAL_MACHINE\Software\Sybase\Adaptive Server Anywhere\8(9).0\Location) was not found. This is now fixed. ================(Build #4255 - Engineering Case #319390)================ .NET application may not have worked properly if the version of native dll (dbdata8.dll) did not match the version of managed dll (iAnywhere.Data.AsaClient.dll). Now, when the managed dll loads the native dll, it checks the version. If the native dll's version is not the same as the managed dll's version, an error message is displayed. ================(Build #4260 - Engineering Case #317916)================ When a program using ADO.NET is built, the version number including the build number of the iAnywhere.Data.AsaClient.dll is stored in the program. When an EBF was installed, the old version of the data provider dll was replaced with a newer one, and the program would then not have load correctly. This has been fixed by installing a 'publisher policy' file that tells the .NET Framework to map older versions of the data provider dll to the newly installed version. ================(Build #4265 - Engineering Case #321355)================ When executing a command to update numeric fields with parameters, the AsaClient needs to convert .Net numeric values to ASA numeric values. If the scale of a numeric value was incorrect, the command would have failed and an exception thrown. This has been fixed. ================(Build #4273 - Engineering Case #322580)================ With this change, the AsaCommand.Cancel method is now supported. An application can now execute some command in one thread and cancel the command in another thread. ================(Build #4278 - Engineering Case #323194)================ Normally an application using the ADO.NET provider will create an AsaCommand object (representing the query to be executed), obtain an AsaReader (representing the cursor for that statement), fetch the rows, call AsaReader.Close() and then delete the AsaCommand object. If the AsaCommand object was deleted before calling AsaReader.Close(), it was possible that the provider would have attempted to send an invalid statement handle to the server when trying to drop the statement. If done repeatedly, this could have resulted in the resource governor for prepared statements being exceeded, as well as wasted resources on the server. The statement is now dropped correctly. ================(Build #4278 - Engineering Case #323683)================ On Windows CE devices, the exception, TypeLoadException, would have been thrown if dbdata8/9.dll was not found in the directory containing iAnywhere.Data.AsaClient.dll. This is now fixed. ================(Build #4285 - Engineering Case #322776)================ The error "System.ArgumentException: Cannot change DataType of a column once it has data" would have been thrown if a DataSet was reused by resetting the DataTables of the DataSet and refilling. This problem has been fixed. ================(Build #4294 - Engineering Case #325292)================ The sample program simplece, may have crashed with a Fatal Application Error, when run on a Windows CE .NET 4.1 device. This has been fixed. ================(Build #4294 - Engineering Case #325713)================ When running on Windows CE, the AsaClient would have failed with an unhandled exception on opening a database connection, if the code-page of the database was not supported by the device. Now the AsaClient will check the code page of the database and if it is not installed on the device, the AsaClient will throw an exception to inform the application. ================(Build #4297 - Engineering Case #327298)================ A VersionNotFoundException would have been thrown when updating a deleted row with the DataAdapter without first setting the DataRowVersion property of DeleteCommand's parameters to 'Original'. This problem is now fixed. ================(Build #4297 - Engineering Case #327306)================ A NullReferenceException would have occurred when calling ExecuteScalar if the command did not return a resultset. This problem has been fixed. ================(Build #4297 - Engineering Case #327312)================ When using the AsaDataAdapter to fill a DataTable that included a varbinary column with a value of empty string, an ArgumentNullException was thrown. The AsaClient was failing to convert the binary column to a byte array for empty strings. This has been fixed by returning a zero-length byte array for empty binary values. ================(Build #4302 - Engineering Case #327840)================ When updating data with a data adapter, DBConcurrency was not thrown if an attempt to execute a DELETE, INSERT or UPDATE statement resulted in no rows being affected. This problem has now been fixed. ================(Build #4303 - Engineering Case #328669)================ The Serializable attribute was not supported for AsaException, AsaError and AsaErrorCollection. The Serializable attribute has now been added. ================(Build #4319 - Engineering Case #329267)================ AsaDataAdapter Update method would have fail if the UpdateCommand was generated by AsaCommandBuilder and the query was upper case. The GetSchema method compared strings case-sensetively and failed to identify the key columns. This has now been fixed by changing the string comparison to case-insensitive when setting the key columns and unique columns in GetSchema method. ================(Build #4323 - Engineering Case #327567)================ When calling AsaDataAdapter.Fill( DataTable ), a NullReferenceException would have been thrown if MissingSchemaAction was AddWithKey and the table already had a primary key. This has been fixed. ================(Build #4327 - Engineering Case #334407)================ Calling AsaDataReader.Read, opened with a stored procedure which declared a result set, would have failed with a 'Cursor not open' error, if the stored procedure did not return a result set. This problem has been fixed. ================(Build #4332 - Engineering Case #336352)================ Hebrew characters in a UTF8 database would have been translated into the wrong characters, if the charset connection parameter was not set to 'utf8'. The AsaClient was using the connection charset for character translation, now the AsaClient will use the database charset, if the charset is not specified in the connection string. ================(Build #4340 - Engineering Case #338251)================ Autoincrement columns were being added to the list of values for INSERT statements generated by AsaCommandBuilder. AsaCommandBuilder now ignores autoincrement columns when generating INSERT statements. ================(Build #4343 - Engineering Case #339037)================ The calls DeleteCommand and UpdateCommand, automatically generated by AsaCommandBuilder, did not handle optimistic locking correctly. This has been fixed. ================(Build #4350 - Engineering Case #340912)================ The domain types, datetime, image, money, oldbit, smalldatetime, smallmoney, sysname, text, uniqueidentifierstr and real were not supported by the AsaClient. The AsaDbType enum has now been modified to add these domain types. ================(Build #4350 - Engineering Case #340958)================ An InvalidCastException would have been thrown when passing a guid string to an Uniqueidentifier parameter. This is now fixed. ================(Build #4350 - Engineering Case #341104)================ An Exception would have been thrown when fetching zero-length long binary column. This is now fixed. ================(Build #4353 - Engineering Case #341484)================ When using the AsaDataAdapter, the Fill method would not have returned when the SelectCommand.Cancel method was called. This problem has been fixed. ================(Build #4359 - Engineering Case #342660)================ Universally Unique IDentifiers, (UUIDs), consists of a 16 byte structure with the following format: time_low unsigned long time_mid unsigned short time_hi_and_version unsigned short clock_seq_hi_and_reserved unsigned small clock_seq_low unsigned small node character(6) The server stores the unsigned long and unsigned short fields in big-endian byte order, where as the .NET structure stores the unsigned long and unsigned short fields in little-endian byte order. This requires the byte order of the unsigned long and unsign short fields to be changed when inserting and retrieving UUID values, which was not being done. This problem has been fixed. ================(Build #4367 - Engineering Case #343503)================ A "Connection was terminated" exception would habe been thrown when executing a command with a pooled connection, if the server was no longer available. This problem has been fixed. ================(Build #4374 - Engineering Case #345221)================ If the AsaClient was in the process of issuing an error, a native error exception would have been thrown, if a codepage corresponding to the database's charset was not available. Now, if the code page of the database is not available, the AsaClient always returns an English error message to the application. ================(Build #4387 - Engineering Case #347032)================ If an error occurred in the managed provider, a MessageBox was being displayed even if the underlying application was running as a service and that service was not running in UserInteractive mode. Now, the MessageBox is no longer displayed in this situation. ================(Build #4392 - Engineering Case #349014)================ An application using the ADO.NET provider may have failed to connect to a version 7.0 server. While connecting, the provider attempts to determine the client's character set and the database's character set, so that it can do character set translation. If the provider determined that it could convert to the database's character set, it attempted to turn off character set conversion on the server by sending a 'change character set' command. The 7.0 server does not recognize this command and responds with an error. It was this error that caused the connection failure. In fact, this error is not fatal and the provider will now ignored it, using the client's character set intead. ================(Build #4397 - Engineering Case #350353)================ Modifying and rebuilding an ASP.Net application, which used the Managed Provider, would have caused the ASP.Net worker process aspnet_wp.exe, to consume 100% CPU time. This has now beed corrected. ================(Build #4401 - Engineering Case #351245)================ The following ADO.Net connection parameters were not allowed to be quoted: - connect timeout - connection timeout - connection lifetime - connection reset - enlist - max pool size - min pool size - pooling - persist security info This has now been corrected, these parameters can now be quoted. ================(Build #4406 - Engineering Case #352119)================ Calling the BeginTransaction() method would have failed with the error "Can not set a temporary option for user 'DBA'", when connected to a database using the Turkish 1254TRK collation. This problem has been fixed. ================(Build #4410 - Engineering Case #352770)================ Attempting to re-execute a query using the ADO function Requery(), would have failed with the error "Function Sequence error". This is illustrated by the following Visual Basic code fragment: SQLText = "Select * from customer" myRS.Open(SQLText, myConn, adOpenDynamic, adLockBatchOptimistic, adCmdText) If myRS.EOF Then myRS.Close() Else myRS.MoveFirst() End If myRS.Requery() This problem has now been fixed. ================(Build #4422 - Engineering Case #355587)================ On dual cpu machines, after creating an new prepared AsaCommand and inserting new rows in a loop, a communication error would have occurred after some iterations. For example, (VB.NET code): Imports iAnywhere.Data.AsaClient Module Module1 Sub Main() Dim conn As AsaConnection Dim cmd As AsaCommand Dim i As Int32 Try conn = New AsaConnection("uid=dba;pwd=sql;eng=asatest") conn.Open() for i = 1 to 2000 cmd = New AsaCommand("insert into ian values( 1 )", conn) cmd.Prepared() cmd.ExecuteNonQuery() Next Console.WriteLine("Inserted {0} rows", i) conn.Close() Catch e As Exception Console.WriteLine(e.ToString()) End Try End Sub End Module This problem has been fixed. ================(Build #4423 - Engineering Case #355929)================ The ASA provider could have loaded the wrong unmanaged dll, (dbdata8.dll or dbdata9.dll), if multiple version of ASA were installed. Now, the ASA provider will search for the unmanaged dll and will continue searching until it finds and loads the right one. If a matching version can not be found, the latest version will be loaded with a warning message. ================(Build #4434 - Engineering Case #355145)================ A .NET application, using multiple database connections through separate threads, could have hung when updating the same table in different threads. When this situation occurred, one thread would have been blocked in the server (which is expected, as it is blocked against the other connection which is holding a lock on the table as a result of its update), and the other thread would appear to be hang as well, but it would not have been blocked in the server. What was happening was that the first thread had entered a critical section and was waiting for the server's response, while the second thread was waiting to enter the same critical section, thus caused the application hang. This has been fixed. ================(Build #4435 - Engineering Case #353442)================ Calling stored procedures with long varchar or long binary output parameters, would have resulted in the data being corrupted after 32K. The AsaClient was always using a default maximum length of 32K. This problem has been fixed. ================(Build #4435 - Engineering Case #358333)================ A NullReferenceException could have occurred when fetching long varchar or long binary date using the DataReader object. This problem has been fixed. ================(Build #4437 - Engineering Case #359136)================ UltraLite.NET has a simpler error system and thus does not have the ADO Errors collection. In order to make it easier to move from UltraLite to ASA, two new properties have been added, AsaException.NativeError and AsaInfoMessageEventArgs. ================(Build #4443 - Engineering Case #360591)================ A data reader opened with a select statement would have held a lock on the table, even after the data reader had been closed. This has now been fixed. ================(Build #4444 - Engineering Case #360761)================ Calling the AsaDataAdapter.Fill method multiple times on the same DataTable that had a primary key, woulkd have caused a 'System.Data.ConstrainException' exception on the second call. Now, if a primary key exists, incoming rows are merged with matching rows that already exist. If no primary key exists, incoming rows are appended to the DataTable. If primary key information is present, any duplicate rows are reconciled and only appear once in the DataTable. ================(Build #4457 - Engineering Case #363177)================ An application that created multiple threads, and opened and closed pooled connections on each thread, could possibly have had the threads become deadlocked, causing come connections to fail, if the 'Max Pool Size' was smaller than the number of threads. This problem has been fixed. ================(Build #4463 - Engineering Case #364573)================ It was not possible to assign an enum value to AsaParameter.Value without an explicit cast. Now when AsaParameter.Value is set to an enum value, the AsaParameter.AsaDbType is set to the underllying type of the enum value (Byte, Int16, UInt16, Int32, UInt32, Int64 or UInt64) and the value is converted to the underlying type. ================(Build #4472 - Engineering Case #366428)================ The AsaCommandBuilder class could not have generated INSERT, UPDATE or DELETE statements for parameterized queries if the parameters were not provided. Now, if the command is a stored procedure, the AsaClient will call AsaCommandBuilder.DeriveParameters to add parameters for the SELECT command. If the command is text, the AsaClient will add some dummy parameters. ================(Build #4477 - Engineering Case #363211)================ A FillError exception was not thrown when an error occurred during a fill operation of the ASADataAdapter object. Now, when an error occurs during a fill operation, the adapter will call the FillError delegate. If Continue was set to true, the adapter will continue the fill operation. Otherwise, it will throw the exception. ================(Build #4477 - Engineering Case #367464)================ The ASACommandBuilder class could not derive parameters if the stored procedure name was quoted. Fixed by parsing the command text and using an unquoted procedure name for deriving parameters. ================(Build #4487 - Engineering Case #369704)================ When filling a DataSet using the ASADataAdapter object, the AutoIncrement property of DataColumn was not set properly. This has now been fixed. ================(Build #4491 - Engineering Case #370326)================ The method AsaDataReader.GetSchemaTable() may have caused an InvalidCastException when the data reader had some unique columns and computed columns. This problem has been fixed. ================(Build #4496 - Engineering Case #371411)================ The isolation level for a transaction was being set to 1 when the connection was opened. Now, the isolation level is no longer set to any specific value. The server default is the value defined for the connection by the database option Isolation_level. Note, this problem was introduced in the following builds: 8.0.3 5128 8.0.2 4442 9.0.2 2528 9.0.0 1333 9.0.1 1887 The old behavior is now restored

Adaptive Server Anywhere - DBLIB Client Library

================(Build #3607 - Engineering Case #303124)================ This change resolves a number of sporatically problems which could have been seen: - failing to connect to the utility_db running on a network server - failing to connect to a server while using a FILEDSN (or any ODBC DSN on UNIX) For either of the above to have occurred, the file containing the utility_db's dba password (util_db.ini) or the FILEDSN, or the UNIX ODBC DSN must have had the following properties: - the DSN being used was the last one in the file - the last line of the DSN was the last line in the file - the last line of the file was either not terminated, or terminated with a single line-feed char (i.e. not carriage-return/line-feed as on Windows platforms) For example, the client could have failed to connect to the utility_db on the first attempt, but be successful if the exact same client connect string was specified a second (or third) time. Then if tried immediately again it could have failed again, etc. This has been fixed, but a work-around is to add a blank line to the end of the file. ================(Build #4076 - Engineering Case #298957)================ When a procedure which did not return a result set was opened in Embedded SQL using EXEC SQL OPEN, the procedure was executed and the SQLE_PROCEDURE_COMPLETE warning was returned. After receiving this warning, attempting to close the cursor gave a SQLE_CURSOR_NOT_OPEN error, and attempting to open a cursor with the same name gave a SQLE_CURSOR_ALREADY_OPEN error. Now the cursor is in the closed state if the open returns SQLE_PROCEDURE_COMPLETE, and opening a cursor with the same name will succeed. ================(Build #4215 - Engineering Case #309294)================ When specifying connection parameters, if one of them was the "Encryption" parameter and it had an incorrect value, then an unhelpful error message is reported. Example: LINKS=TCPIP;ENC=ECC-TLS(trusted_certificates=sample.crt) would have displayed the following message: Parse error: Bad value near '' This has been fixed. The following message is now displayed: Parse error: Bad value near 'ECC-TLS(trusted_certificates=sample.crt)' ================(Build #4265 - Engineering Case #321289)================ If an integrated login attempt failed because of a communications error, the client application could have crashed. This would only have happened if the connection string, (or data source if the DSN parameter was used), contained all of Integrated=YES, Userid and Password. This has been fixed. ================(Build #4289 - Engineering Case #326018)================ Fetching an ESQL DT_STRING, DT_DATE, DT_TIME, or DT_TIMESTAMP host variable (or type array of char) where the length of the char array was one, did not add the null character. This has been fixed so that the null character is set (note no data is actually copied into the host variable's character array other than the null character, since there is only space for the null character). Fetching an ESQL DT_STRING with length zero on a blank padded database could have caused dblib to crash. This case was only possible when using an SQLDA, and has been fixed so that no data is copied (not even the null character). ================(Build #4312 - Engineering Case #331547)================ The connection-dropped callback function was not being called for TCPIP or SPX connections. This has been fixed. ================(Build #4313 - Engineering Case #331789)================ After a multi-threaded windows application called db_fini, SQLFreeEnv, etc to finalize the client database interface (dblib, ODBC, etc), there could have been unfreed thread handles remaining. This has been fixed so that all thread handles created by the client database interface are now freed. Note the client database interface library will only free all resources after it has been finalized the same number of times it has been initialized. ================(Build #4323 - Engineering Case #333108)================ It was possible for the disconnect of a shared memory connection to the NetWare server to cause the server to crash. This has been fixed. ================(Build #4324 - Engineering Case #333483)================ In rare cases, an application could have crashed or hung in the client libraries if it did a repeated number of operations that involved initializing the environment, connecting to a database server, disconnecting, and finally destroying the environment. This was more likely to occur with TCPIP connections. It has been fixed. A workaround is to keep at least one user environment active. ================(Build #4348 - Engineering Case #340537)================ It was possible for an application using dblib to have crashed, if a parse error occurred on a connection string that was longer than about 50 characters. This has been fixed. ================(Build #4352 - Engineering Case #341109)================ The behaviour of an empty connection parameter was changed inadvertently by engineering change 336563. This fix restores the behaviour to be the same as before the change. ================(Build #4358 - Engineering Case #342519)================ When attempting to connect over the shared memory link, a rare timing dependant situation may have caused the application to hang. This was more likely (although still very rare) to have occurred on multiprocessor machines. This has been fixed. ================(Build #4367 - Engineering Case #344020)================ Calls to the db_stop_database function would have failed if the server was not found using the shared memory link, even if the LINKS parameter was specified in the connection string or DSN. The LINKS parameter was being ignored. ================(Build #4379 - Engineering Case #345936)================ If an Embedded SQL or ODBC application connected with an ENG connection parameter containing a dot, and after the dot, a back slash, forward slash, semicolon, or ampersand, the application would have crashed. This has be fixed ================(Build #4406 - Engineering Case #352159)================ It was possible for an application to have hung after attempting to cancel a request. This problem would only have occurred very rarely on multiprocessor systems, and was even less likely to have occurred on single processor systems. This has been fixed. ================(Build #4419 - Engineering Case #354838)================ If an error occurred on an embedded SQL EXECUTE statement, and there were bound columns with all NULL data pointers, a communication error could have occurred and the connection would have been dropped. An example of bound columns will all NULL data pointers from ESQL is: SQLDA *sqlda = alloc_sqlda( 1 ); sqlda->sqld = 1; sqlda->sqlvar[0].sqltype = DT_INT; sqlda->sqlvar[0].sqldata = NULL; EXEC SQL EXECUTE stmt into descriptor into_sqlda; This has been fixed so that an error is returned and the connection is not dropped. ================(Build #4443 - Engineering Case #360597)================ Applications attempting Shared memory connections may have hung if the server was forcibly shut down during the connection attempt. This has been fixed. ================(Build #4451 - Engineering Case #362197)================ If a multi-threaded client application had more than one connection (on more than one thread) logging to the same log file, the logged entries from the connections could have been mixed up. Specifically, several timestamps may have appeared together, followed by the text of the messages. Also, in 9.x clients, the date stamp at the top of the file would always have used lowercase English strings. This has been fixed. ================(Build #4459 - Engineering Case #336902)================ In rare instances, NetWare or Unix client applications, using ecc_tls or rsa_tls encryption, would have had connection attempts fail. The debug log would have shown a message that the Certicom handshake had failed. This has been fixed. ================(Build #4462 - Engineering Case #364378)================ If an error occurred when positioning a cursor, future fetches would have failed with the error -853 "Cursor not in a valid state". When prefetch was enabled (the default) the specific error when positioning a cursor may not have been returned to the application, with "Cursor not in a valid state" being returned instead. For example, if a query had a WHERE clause which caused a conversion error, the application may never have received an error stating a conversion error occurred, but would have received the error "Cursor not in a valid state" instead. This has been fixed so that the initial error, which put the cursor in an invalid state, is now returned to the application. ================(Build #4467 - Engineering Case #365460)================ An application that used GetData to retrieve an unbound column on the first row, could have had poor performance, if prefetch was enabled and some, but not all columns, were bound before the first fetch. This poor performance would have been particularly noticeable if the first few rows of the query were expensive to evaluate. Applications which used the iAnywhere JDBC driver, on queries which had columns with type LONG VARCHAR or LONG BINARY, were also affected by this poor performance. This has been fixed. ================(Build #4478 - Engineering Case #367691)================ On AIX systems running version 4.3.1, applications, including the ASA utilities such as dblocate, would have failed to find any network servers over TCP/IP, if the host=xxx parameter was not specified. Code specific to AIX 4.3.1 to find the broadcast mask was incorrect. This has now been fixed. ================(Build #4502 - Engineering Case #372175)================ The server could have leaked memory, eventually resulting in an 'Out of Memory' error. This could have occurred while executing INSERT or LOAD TABLE statements for tables which the server maintains statistics. This has been fixed

Adaptive Server Anywhere - JDBC Client Library

================(Build #4292 - Engineering Case #326342)================ If a batch or procedure returned multiple result sets and one of the result sets generated a warning, then the JDBC driver would have failed to return the remainder of the result sets. This problem has now been fixed. ================(Build #4317 - Engineering Case #322867)================ When executing a batch that returned multiple result sets with differing schema and connected via the iAnywhere JDBC Driver, fetching the second or subsequent result set could have resulted in conversion or truncation errors. For example, the following batch would have failed to return the second result set correctly. drop table test; create table test( c long varchar ); insert into test values ('test'); BEGIN select 123; SELECT c from test; END This problem has now been fixed. A second problem with multiple result sets was also fixed. If the previous result set was closed, then the call to determine if there were additional result sets would have failed, making it seem like there were no more result sets for the statement. This problem has also been fixed. ================(Build #4340 - Engineering Case #338292)================ If a Java application connected via the iAnywhere JDBC Driver and positioned a cursor beyond the end of a result set, then a previous() call would have failed, rather than return the last row in the result set. This has now been fixed. ================(Build #4343 - Engineering Case #339364)================ If a ResultSet object was closed (either explicitly or implicitly), the iAnywhere JDBC Driver would have leaked memory. This problem was most noticeable if a prepared statement was executed many times. The problem has been fixed. ================(Build #4346 - Engineering Case #338304)================ If an application connected via the iAnywhere JDBC Driver and attempted to create a statement, or a prepared statement, of type INSENSITIVE, the JDBC driver would have actually openned a sensitive cursor instead. This problem has now been fixed. ================(Build #4349 - Engineering Case #340835)================ If an application attempted to set a parameter to be an empty binary array (eg. setObject( 1, new byte[0] )), the subsequent executeQuery or executeUpdate call would have resulted in a Java exception. This problem has been fixed. ================(Build #4359 - Engineering Case #330140)================ Entering a table name in the Import Wizard, qualified by owner name, Would have caused an exception reporting that the table did not exist, even if it did or if the wizard was to create the table. This has been fixed. ================(Build #4366 - Engineering Case #343176)================ When using the iAnywhere JDBC Driver, calling the method DatabaseMetaData.getURL() would have returned null, instead of the actual URL used to establish the connection. This problem has been fixed. ================(Build #4382 - Engineering Case #345171)================ If an application called ResultSet.isLast() prior to calling ResultSet.next() or ResultSet.first() on a ResultSet object, then calling ResultSet.next() afterwards would have incorrectly returned FALSE. This problem has now been fixed. ================(Build #4398 - Engineering Case #350688)================ If an application called ResultSet.last(), to scroll to the last row in the result set, and then called ResultSet.isLast(), to check to see if the cursor was positioned on the last row, the iAnywhere JDBC Driver would have incorrectly returned false, rather than true. This problem has now been fixed. ================(Build #4412 - Engineering Case #353208)================ Referencing columns in a result set by name, rather than by its ordinal postion, may have failed. Since column names are case insensitive, all references to column names are converted to lower case before any comparison. It was this convertion to lower case that was being done incorrectly. This problem has now been fixed. ================(Build #4452 - Engineering Case #362356)================ While connected to a multi-byte character set database with the iAnywhere JDBC Driver, executing a procedure whose result set was defined to have a varchar column, but the size of the column in the definition was too small, could have resulted in an "Out of memory" exception. This problem has now been fixed. For example: CREATE PROCEDURE test() result( c1 varchar(254) ) begin select repeat( 'abcdef', 1000 ) end Notice that a varchar( 254 ) column is much too small to hold the result of repeat( 'abcdef', 1000 ). In this case, executing the procedure test would have resulted in an "Out of memory" exception. ================(Build #4502 - Engineering Case #373086)================ If a JDBC cursor was positioned on a row with a LONG VARCHAR column, then calling ResultSet.getString() on the column would have returned the proper value for the first call, but each subsequent call would have returned NULL if the cursor had not been repositioned. This problem has now been fixed.

Adaptive Server Anywhere - ODBC Client Library

================(Build #4081 - Engineering Case #296731)================ When fetching data as Unicode strings, SQLGetData could have returned the wrong value for the string length, when the database character set was UTF8. This would only have occurred when the buffer being fetched into was larger than the UTF8 string length, but smaller than the string length once it was converted to Unicode. This has been corrected. ================(Build #4090 - Engineering Case #302303)================ An ODBC application could have crashed, if it called SQLGetDiagRec or SQLGetDiagRecW with the record number parameter greater than 2 and there were three or more diagnostic records. This has been fixed. ================(Build #4090 - Engineering Case #302554)================ SQLColAttributes and SQLColAttribute would have returned the type as "char" for the following column types: LONG VARCHAR BINARY VARBINARY LONG VARBINARY BIGINT TINYINT BIT GUID The correct type name is now returned. ================(Build #4095 - Engineering Case #302555)================ Calling the ODBC function SQLGetInfo() for SQL_OJ_CAPABILITIES would not have reported that "Full outer joins are supported" (SQL_OJ_FULL). SQL_OJ_FULL has now been added to the list of outer join capabilities. ================(Build #4095 - Engineering Case #303304)================ Calling the ODBC function SQLGetInfo() for SQL_GROUP_BY, would have incorrectly returned the capability SQL_GB_NO_RELATION, (The columns in the GROUP BY clause and the SELECT list are not related). Now, the correct capability SQL_GB_GROUP_BY_CONTAINS_SELECT is returned, (The GROUP BY clause must contain all non-aggregated columns in the select list). ================(Build #4208 - Engineering Case #305454)================ When positioning to the last row in a result set containing only 1 row, the RowCount value reported would have been 0, when it should have been 1. This could have occurred using SQLExtendedFetch() or SQLFetchScroll() with a FetchOrientation of SQL_FETCH_LAST, or with the RDO MoveLast, and a result set with exactly one row. The problem has been fixed. ================(Build #4211 - Engineering Case #306170)================ In a Visual Basic RDO application, when updating columns in a result set, the updates fail after the first rowset has been processed. A MoveNext would fail with an error "Not Enough fields allocated in SQLDA". The problem has been fixed. ================(Build #4212 - Engineering Case #308449)================ The ODBC driver may have occasionally reported the lengths of strings incorrectly, when dealing with multibyte character sets. The data was returned correctly, but the length would sometimes be too long. The length reported should now be correct. ================(Build #4215 - Engineering Case #309298)================ When using SQLGetData to fetch Unicode strings, the indicator could occasionally have been incorrect, multiple columns were being fetched from the same row, and if the strings were being fetched in pieces. This has been fixed. ================(Build #4216 - Engineering Case #302959)================ A query with a proxy table and an alias in the select list may have caused the server to crash or hang with 100% cpu utilization. This is now fixed. ================(Build #4224 - Engineering Case #310019)================ The returned value for SQL_DBMS_VER was only displaying the major version of the server that the driver was connected to. For example, for ASA 7.0.4, the string returned was "07.00.0000" and, for Adaptive Server IQ 12.4.3, the string "12.00.0000" was returned. This has been corrected. For Adaptive Server Anywhere version 7.0.4 the string returned for SQL_DBMS_VER is now "07.00.0004". For Adaptive Server IQ version 12.4.3, the string "12.04.0003" will be returned. ================(Build #4230 - Engineering Case #312857)================ A call to SQLMoreResults was returning SQL_NO_DATA_FOUND, instead of SQL_ERROR, when a batch contained a statement with an error. According to the ODBC specification, if one of the statements in a batch fails, and the failed statement was the last statement in the batch, SQLMoreResults should return SQL_ERROR. This has been corrected. ================(Build #4246 - Engineering Case #317279)================ The Windows CE ODBC driver was using the connection parameters from the first connection's FILEDSN for future connections even, if a different FILEDSN was subsequently used. This has been fixed. ================(Build #4250 - Engineering Case #318137)================ A shared memory connection could have failed on Windows CE platforms after unloading and reloading dbodbc8.dll. For example, if a client application: 1) made a shared memory connection 2) disconnected 3) unloaded dbodbc8.dll 4) reloaded dbodbc8.dll again 5) attempted another shared memory connection within a few seconds of the previous disconnect Then the second connection attempt could fail. A debug log (generated using the LOGFILE connection parameter) would indicate that shared memory could not be started. This has been fixed. ================(Build #4259 - Engineering Case #320516)================ In a datasource file on Windows CE, the long form of a connection parameter could not have been specified, only the short form. For example, DATABASEFILE could have been specified, but not DBF. This has been fixed so that either form can now be specified for all parameters. ================(Build #4259 - Engineering Case #320581)================ When using SQLGetData on a SQL_WCHAR column, fetched from a UTF8 database, the resultant indicator value was incorrect if the data was obtained in chunks. When using SQLGetData to convert binary data to a SQL_WCHAR column, the resultant indicator value was incorrect. For binary to wide character conversions, if the data was fetched in chunks, the pieces would be placed in the wrong location in memory. The terminating NULL wide character was placed in the wrong location in memory. For binary to wide character conversions, the call to the translation DLL passed the wrong type, SQL_CHAR instead of SQL_WCHAR, for wide characters. In some cases, it passed the wrong length as well. These problems have been corrected. ================(Build #4276 - Engineering Case #323291)================ If a cursor had both bound columns and used getdata statements, and the first column was not bound but accessed using a getdata, then the fetch may have returned no error or warning when it should have returned SQL_NOTFOUND or SQL_NO_DATA. This problem was more likely when the DisableMultiRowFetch parameter was used. Attempting to do a getdata when past the end of the result set would have failed with a "No current row of cursor" error. Also, if a cursor had both bound columns and used getdata statements, and the DisableMultiRowFetch connection parameter is used, poor performance could have occurred. Both of these problems have been fixed. ================(Build #4282 - Engineering Case #324841)================ When a procedure returns multiple result sets, the SQLMoreResults() function is used in ODBC to move to the next result set. If that next statement returned a warning, SQLMoreResults would have completed without opening the result set. The problem is now fixed, and SQLMoreResults will return SQL_SUCCESS_WITH_INFO indicating that the result set is open, but that a warning was returned. ================(Build #4293 - Engineering Case #326460)================ When using ODBC and fetching multi-byte characters from a UTF8 database, a truncation error could have occurred, even though the correct target buffer length and type were set in SQLBindCol. The ODBC driver used the length of the user's buffer as the length of its own internal buffer. Since one UTF8 character can occupy 1, 2, 3, 4 or more bytes, a larger internal buffer is required. This has been fixed. ================(Build #4293 - Engineering Case #326462)================ SQLGetDescField and SQLColAttribute were returning SQL_FALSE for the SQL_DESC_UNSIGNED attribute for non-numeric types such as SQL_CHAR, implying that these were signed types. The ODBC standard states that: "This read-only SQLSMALLINT record field is set to SQL_TRUE if the column type is unsigned or non-numeric, or SQL_FALSE if the column type is signed." Also, SQL_TINYINT was treated as signed when ASA does not support a signed tinyint. This has been corrected. The following types are now considered signed. SQL_C_NUMERIC or SQL_NUMERIC SQL_DECIMAL SQL_C_FLOAT or SQL_REAL SQL_C_DOUBLE or SQL_DOUBLE SQL_BIGINT SQL_C_SBIGINT SQL_C_LONG or SQL_INTEGER SQL_C_SLONG SQL_C_SHORT or SQL_SMALLINT SQL_C_SSHORT The rest are unsigned types including SQL_C_TINYINT or SQL_TINYINT and SQL_C_STINYINT since ASA does not support a signed tinyint. ================(Build #4295 - Engineering Case #326962)================ Connecting to the utility database using the iAnywhere JDBC Driver, when running in a Japanese environment, and then attempting to execute a CREATE DATABASE command with Japanese characters in the database name, would have failed with an error that the database '??' could not be created. A similar error would have occurred when using Sybase Central connnected via the iAnywhere JDBC Driver. This problem has now been corrected. ================(Build #4306 - Engineering Case #328847)================ If an application fetched character columns using the OLEDB driver and the length of the data was more than 200 bytes, then the data returned could have been truncated. This problem has been fixed. ================(Build #4316 - Engineering Case #332794)================ Attempting to prepare a statement with an empty column alias (ex. SELECT 1 "") would have caused the ODBC driver to crash. This problem has been fixed. ================(Build #4317 - Engineering Case #332974)================ Unix applications, attempting to connect via TCPIP, may have failed to connect with the error message: "Unable to initialize requested communication links". This problem only occurred when connecting via streams, (ie ODBC, dblib or iAnywhere JDBC), not TDS, (ie jConnect or Open Client). Also, the problem required many iterations of: - Creating an environment - Connecting through TCP/IP - Disconnecting - Destroying the environment THis problem is now fixed. ================(Build #4321 - Engineering Case #333271)================ When attempting to update a base table joined with a proxy table, the columns being updated were getting set to NULL instead. Such operations are not supported and should have caused an error. The problem has now been resolved and a proper error is now raised. ================(Build #4340 - Engineering Case #337943)================ In ODBC 2.x, the standard syntax of the escape sequence was: --(*vendor(vendor-name), product(product-name) extension *)-- In addition to this syntax, there was a shorthand syntax of the form: {extension} For example: select --(*vendor(iAnywhere), product(SQL Anywhere) d 1999-11-04 *)-- from dummy; or select {d 1999-11-04} from dummy; The standard syntax, now deprecated in ODBC 3.x, was to allow for keyboards that do not support the curly braces characters, (such as the IBM 029 keypunch). The extension syntax was supported, but the standard syntax was not supported correctly. This has been fixed. ================(Build #4342 - Engineering Case #339163)================ Support for ODBC GUID escape sequences has now been added to the ASA ODBC driver. Supplied values of the form "{ guid 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' }" will be converted to binary GUID values and are equivalent to the following SQL statement, cast('41dfe9ef-db91-11d2-8c43-006008d26a6f' as UNIQUEIDENTIFIERSTR ). GUID escape sequences may also be used as input parameters for bound GUID data types. This is how the ODBC specification describes the GUID escape syntax. ================(Build #4343 - Engineering Case #339348)================ If an application's object destructor made an ODBC call after exit() had been called (or the application's main() routine had returned), then the application may have crashed, (i.e. a call was made to the ODBC driver after the runtime had called the library's fini routine). Also, if the application was using ODBC driver on Unix as a driver manager, and made an ODBC call after it has destroyed the ODBC environment (i.e. SQLFreeEnv had been called), then the application may have crashed. This has been fixed, now an error will be returned. ================(Build #4352 - Engineering Case #341242)================ When using SQLProcedureColumns to determine the type and position of a procedure's parameters, the ORDINAL_POSITION of an OUT parameter was always reported as 0, for any and all OUT parameters. For the following procedure: create procedure testargs( in arg1 integer, inout arg2 integer, out arg3 integer ) begin set arg2 = arg1 * arg2; set arg3 = 999; end the ordinal positions for arg1, arg2, and arg3 would have been reported as 1, 2, and 0. This has been corrected and the ordinal positions for arg1, arg2, and arg3 are now reported as 1, 2, and 3. ================(Build #4353 - Engineering Case #341446)================ A call to SQLNativeSql would have resulted in a truncated string, when the output buffer length was less than twice the length of the input string. This has now been corrected The following C example shows the problem: char sql_stmt_out[24]; strcpy( sql_stmt_in, "select * from customer" ); rc = SQLNativeSql( dbc, sql_stmt_in, SQL_NTS, sql_stmt_out, sizeof( sql_stmt_out ), &len ); The output buffer would have contained only 12 characters (ie 24/2). ================(Build #4355 - Engineering Case #341910)================ Calling SQLGetDiagField() with a DiaIdentifier of SQL_DIAG_ROW_NUMBERshould, would have returned the row number in the rowset, not the row number in the result set. For example, after a second SQLFetchScroll (for a rowset of size 1), if a truncation occurred, the record number reported as beaing truncated would have been 2, which was incorrect. This problem has been fixed, SQLGetDiagField() now returns the rowset number of the row with an error. ================(Build #4356 - Engineering Case #342036)================ The ODBC function SQLGetInfo returns a list of the keywords supported by the database server. The list was incomplete and was missing some recent additions including ROLLUP. This has been fixed. ================(Build #4357 - Engineering Case #342150)================ The UNIQUEIDENTIFIER data type is stored in the database as a 16 byte binary value. This value was not being stored correctly on little-endian platforms, such as Intel x86. This problem has been corrected in the ODBC and OLEDB drivers. ================(Build #4384 - Engineering Case #347306)================ When doing a SQLPutData or SQLSetPos using bound variables, specifying a zero-length string could cause a crash in the ODBC driver. This has been fixed. ================(Build #4392 - Engineering Case #348106)================ In a Visual Basic RDO application, after updating columns in a resultset, calling MoveFirst or MoveLast would then have failed with the error "Not Enough fields allocated in SQLDA". For example: Call GResSet.Edit() GResSet.rdoColumns("Col2").Value = 2 Call GResSet.Update() GResSet.MoveFirst() < ---- 'Error : Not Enough fields allocated in SQLDA The same problem was reproducable when calling ODBC functions directly. For example: Set rowset size to 100. SQLExtendedFetch (SQL_FETCH_FIRST) to obtain a rowset. SQLSetPos (SQL_UPDATE) to change a row in the rowset. SQLSetPos (SQL_REFRESH) to update a row in the rowset. SQLExtendedFetch (SQL_FETCH_FIRST) to refetch the rowset. < ---- 'Error : Not Enough fields allocated in SQLDA This problem has been fixed. ================(Build #4397 - Engineering Case #350399)================ If a binary column was bound as char (SQL_C_CHAR) or wide char (SQL_C_WCHAR) and the rowset size was greater than 1, and more than 1 row was fetched, the calculation for the offset into the data buffer for the column value was incorrect. For SQLBindCol(), BufferLength is the size of a single element in the data buffer array. The calculation for the offset was (BufferLength* row_number )+(column_size * row_number) where row_number is 0, 1, 2, 3, etc. This incorrect calculation was done in an attempt to compensate for the fact that each binary byte results in two character bytes upon conversion. For example, if the column was BINARY(20) and it was bound as SQL_C_CHAR and the BufferLength value was 20, then the converted values were stored at offset 0, 20*1+20*1, 20*2+20*2, etc. which was 0, 40, 80, etc. This is incorrect. The column values must be stored at offset 0, offset BufferLength * 1, offset BufferLength * 2, etc. which, in the example, is 0, 20, 40, etc. This problem has been fixed, but as a result. the application must ensure that the value for BufferLength for binary to character conversions, is double that of the actual column length, in order to avoid truncation. For example, if the column is BINARY(20) and it is bound as SQL_C_CHAR then the BufferLength value must be 40 (ie 2*20). A similar problem also existed for UniqueIdentifier columns, bound as char (SQL_C_CHAR) or wide char (SQL_C_WCHAR), in which a 16-byte binary value is converted to a 36-byte character string complete with hyphens (e.g., "41dfe9e6-db91-11d2-8c43-006008d26a6f" ). The buffer offset calculation for this was also incorrect, and has also has been corrected. ================(Build #4398 - Engineering Case #349975)================ Blob data, written to a database by an ODBC application using SQLPutData, would have been corrupted if the following conditions were true: - the application used a different charset than the database - the server had character set translation enabled - the length parameter passed to SQLPutData was larger than SQL_ATTR_MAX_LENGTH In this case the data is send as VARCHAR and the server does character set translation. This has now been fixed. ================(Build #4409 - Engineering Case #352795)================ If a Unicode (wide character) value was bound with SQLBindParameter, in a database using the UTF8 collation, then the column value may not have been transmitted back to the application properly. This problem would have occurred under the following conditions: 1. The value must have been bound with SQL_C_WCHAR. 2. The indicator length must have been set to the value's actual length (rather than SQL_NTS). 3. The column must have contained embedded NULL wide characters. 4. The table must reside in a database using the UTF8 collation. This problem has now been fixed. ================(Build #4428 - Engineering Case #352572)================ An application that used multiple threads to access the same connection through ODBC could have hung. This has been fixed. ================(Build #4438 - Engineering Case #359428)================ A memory leak can have occurred in the ODBC driver if the database server closed the connection for any reason, for example an idle time-out. A pointer to the driver's connection object was being set to null, but the object was not freed. This has now been corrected. ================(Build #4442 - Engineering Case #360479)================ The ODBC SQLDisconnect() function could have returned a failing error code if the server dropped the client's connection (e.g. for idle time-out reasons), while the connection had a dirty transaction to be committed or rolled back (i.e. SQLExecute, SQLExecDirect or SQLSetPos was called), and SQL_AUTOCOMMIT_OFF option was set ON for the connection. Now, SQLDisconnect() returns SQL_SUCCESS_WITH_INFO and sets the SQLSTATE to 01002 (Disconnect error). ================(Build #4462 - Engineering Case #364278)================ Support for message callbacks has now been added to the ODBC driver. The message handler is installed by calling the SQLSetConnectAttr() function. For example: static char mybuff[80]; static int mytype; // callback for messages void SQL_CALLBACK my_msgproc( void * sqlca, unsigned char msg_type, long code, unsigned short len, char * msg ) { memcpy( mybuff, msg, len ); mybuff[ len ] = '\0'; mytype = msg_type; } // install the message handler for this connection rc = SQLSetConnectAttr( dbc, ASA_REGISTER_MESSAGE_CALLBACK, (SQLPOINTER) &my_msgproc, SQL_IS_POINTER ); Then a SQL statement such as: Message 'after' type status to client; will invoke the ODBC client application's message handler. ================(Build #4463 - Engineering Case #364608)================ If an ODBC application running on a Windows system fetched a string with embedded null characters, the resulting string would have been truncated at the first null character. This problem has been fixed. Note that a similar problem exists for applications running on Unix platforms as well. However this problem exists in the iAnywhere JDBC Driver and is addressed by Engineering Case 364379. ================(Build #4475 - Engineering Case #367232)================ If a database created with the UTF8 collation, had a column that contained a 5 or 6 byte Chinese character sequence, ODBC client applications would likely have crashed fetching the column. This has been fixed. This problem was introduced by the changes for Engineering Case 364608. ================(Build #4498 - Engineering Case #370905)================ An ODBC application that allocated both an ODBC 2.0 style environment handle and an ODBC 3.0 style environment handle, could have have returned ODBC 3.0 result codes when functions were called in the ODBC 2,0 environment, or vice versa. This could have lead to subsequent function calls failing with erroneous error messages, including 'function sequence error'. Now, the driver will always allocate a separate environment handle each time SQLAllocEnv or SQLAllocHandle is called. ================(Build #4502 - Engineering Case #370604)================ In ODBC, changing the option for a cursor's scrollability, could have caused the driver to change the cursor type as well. For instance if the cursor type was forward-only, changing the scrollability to scrollable would have changed the cursor type to dynamic. The problem was that the driver was always changing the cursor type to dynamic regardless of the existing cursor type. This has been corrected. ================(Build #4511 - Engineering Case #355595)================ Calling the ODBC function SQLGetData() with a length of 0 would have failed for SQL_WCHAR. SQLRETURN SQLGetData( ÿÿÿÿÿSQLHSTMTÿÿÿÿÿStatementHandle, ÿÿÿÿÿSQLUSMALLINTÿÿÿÿÿColumnNumber, ÿÿÿÿÿSQLSMALLINTÿÿÿÿÿTargetType, ÿÿÿÿÿSQLPOINTERÿÿÿÿÿTargetValuePtr, ÿÿÿÿÿSQLINTEGERÿÿÿÿÿBufferLength, ÿÿÿÿÿSQLINTEGER *ÿÿÿÿÿIndPtr); SQLGetData can be used to obtain the amount of data available by passing 0 for the BufferLength argument. The amount of data available is returned in the location pointed to by IndPtr. If the amount available cannot be determined, SQL_NO_TOTAL is returned. When the TargetType was SQL_C_WCHAR, the amount of available data was incorrect (a character count rather than byte count was returned). This has been fixed. There were also some problems returning correct indicator values for databases using the UTF8 collation. This has also been fixed.

Adaptive Server Anywhere - OLEDB Client Library

================(Build #4076 - Engineering Case #270447)================ Updating, inserting or deleting through an ADO client side cursor would have failed with the error: "Insufficient base table information for updating or refreshing". This is now fixed. ================(Build #4076 - Engineering Case #286173)================ When viewing table data through the Visual Studio .Net Server Explorer, character data had an extra byte (usually a square box) appended to it. This has been fixed. ================(Build #4076 - Engineering Case #287854)================ Using ADO and fetching backward through a cursor (using MovePrevious) until hitting the start of the result set (BOF) and then fetching forward (using MoveNext) would have incorrectly set EOF on the first MoveNext after hitting BOF. This is now fixed. ================(Build #4076 - Engineering Case #298526)================ When using the OLEDB driver to retrieve schema rowsets, the rowset properties were sometimes incorrect and could have (depending on the application) caused every second row to be missing. The properties which could be wrong were DBPROPSET_ROWSET, DBPROP_BOOKMARKS and DBPROP_IRowsetLocate and have been corrected. ================(Build #4076 - Engineering Case #298602)================ Fetching the second row of a result set in an updateable cursor, where one of the columns had more than 200 bytes of data, would have resulted in an error. This has now been fixed. ================(Build #4078 - Engineering Case #300109)================ Columns were always being reported as not nullable through the ASA provider. This was most noticeable when generating datasets in Visual Studio .NET. The AllowDBNull property would always be false, even if a column allowed nulls. This has been corrected. ================(Build #4083 - Engineering Case #299664)================ Using the ASA oledb provider to access a database from Powerbuilder would have failed as of versions 7.0.4.3382, 8.0.1.3062 and 8.0.2.4076. This was due to a problem introduced as part of the fix for issue 270447. This problem has now been corrected. ================(Build #4088 - Engineering Case #302381)================ It was possible that a client application, using the ASA provider, could have overwritten memory when updating or inserting a record in an ADO recordset or through the irowsetupdate or irowsetinsert interfaces. This has been fixed. ================(Build #4094 - Engineering Case #303608)================ This change fixes a number of provider problems when used with PowerBuilder. Note that a PowerBuilder problem still exists which causes an error dialog when creating catalog tables when connecting to a Database Profile from PowerBuilder for the first time. The problems fixed include: 1. IDBInitialize::Initialize no longer requires the Data Source property (DBPROP_INIT_DATASOURCE). Before this fix, all connection properties were ignored if there was no Data Source property and the OLE DB driver prompted for connection information. 2. IOpenRowset::OpenRowset was not correctly using passed in properties to determine cursor type & updatability. This also affects ITableDefinition::CreateTable if ppRowset is not NULL. 3. IColumnInfo::GetColumnInfo now only includes bookmark column info if bookmarks are enabled on the rowset. 4. IRowsetUpdate::Update now allows non-NULL pcRows and NULL prgRows. This affects 8.0.0 and up only, since the 7.0.4 OLE DB provider did not give an error in this case. (The Microsoft MSDN Documentation states that this is an error, but I expect that Microsoft OLE DB drivers actually allow this). ================(Build #4099 - Engineering Case #304698)================ If the 8.0 ASAprov oledb provider was used to connect to a database running on an ASA 7.0 server or the codepage for the database character set was not installed, the connection will fail with the error: "The system does not support conversion between Unicode and the requested character set, substituting the current ansi codepage". This is now treated as a warning instead of an error. ================(Build #4119 - Engineering Case #296415)================ Using client side cursors to fetch datetime values through the ASA oledb provider (ASAProv), would have failed or returned #ERROR instead of the actual value. This is now fixed, but a work around would be to use server side cursors. ================(Build #4199 - Engineering Case #302936)================ It was possible that an application could have crashed, or failed to insert a row, when calling the rowset update function (or the AddNew and Update functions) in ADO. This has now been fixed. ================(Build #4206 - Engineering Case #306023)================ The ASAProv OLEDB provider could have failed when accessed by multiple threads concurrently, with failures more likely to have occurred on multi processor machines than single processor machines. One instance of this failure was the error DB_E_BADTYPENAME(0x80040E30) from ICommandWithParameters::SetParameterInfo. This is now fixed. ================(Build #4212 - Engineering Case #305107)================ When the provider copied column values to its data buffer, a column could have been partially overwritten by a subsequent column, if an intervening column was the empty string. This has been fixed. ================(Build #4213 - Engineering Case #308245)================ When function IRowsetLocate::GetRowAt was called to fetch result set rows using bookmarks; for static and keyset cursors, ASAProv may have missed a row due to an invalid offset for some bookmark values. This is now fixed. ================(Build #4216 - Engineering Case #306474)================ If a blob column was updated using the ASA provider,(eg. through ADO cursors ), it could have crashed or updated the data incorrectly. This has been fixed. ================(Build #4217 - Engineering Case #309628)================ When fetching data via ASAProv from a database which used a multibyte collation, and charset conversion was requested, the returned length of the converted string was not set correctly. This could have caused unintended behaviour in ADO applications. This is now fixed. ================(Build #4219 - Engineering Case #310101)================ Trying to disable OLE DB Connection Pooling by adding "OLE DB Services = -2" in the connection string of the ASA OLEDB provider, would have caused a "R6025 Pure Virtual Function Call" error, when a second query was executed. This has now been fixed. ================(Build #4223 - Engineering Case #310866)================ ASAProv was returning incorrect string values for database with a UTF8 collation. The UFT8 string values were converted to the required string type(ie DBTYPE_STR, DBTYPE_WSTR or DBTYPE_BSTR), but the null terminator was not being set. This is now fixed by null terminating the string. ================(Build #4226 - Engineering Case #311234)================ When connected to a database with a UTF8 collation,ASAProv converts from UTF8 to Unicode. This conversion may have used a wrong string length, which would have caused the run-time heap to have become corrupted. Also, the string buffer was not initialized before converting the UFT8 strings. These problem lead to various failures using VS.Net, and have now been fixed. ================(Build #4230 - Engineering Case #312905)================ Fetching more that 200 characters, using the OLEDB provider, into a DBTYPE_BSTR could have left garbage data following the valid column data. This has been fixed. ================(Build #4231 - Engineering Case #299584)================ After a row is added to an oledb rowset (ADO recordset), its edit state is set to DBPENDINGSTATUS_NEW (ADO adEditAdd). If column values are then set for the row, the edit state should not change, but the ASA provider was changing it to DBPENDINGSTATUS_CHANGED (ADO adEditInProgress). Now it will no longer do this for newly added rows, so they will retain their DBPENDINGSTATUS_NEW (aado adEditAdd) state until the row is committed to the database or the changes are rolled back. ================(Build #4231 - Engineering Case #313309)================ Calling a stored procedure in Visual Basic .Net could have resulted in the error "syntax error or access violation: near '?' " This is now fixed. ================(Build #4233 - Engineering Case #312906)================ The SQL generated by the ASA provider's ITableDefinition and IOpenRowset methods was not being correctly quoted. These methods would have failed if the table name was specified as owner.name or if any object name was a keyword or not a valid identifier. For 7.0.4 only, if ITableDefinition or IAlterTable methods generated SQL that was over 255 characters, these methods could fail. This has been fixed. ================(Build #4233 - Engineering Case #313144)================ When using the OLEDB driver, (or ODBC), on Windows CE devices, Japanese characters with object names (e.g. table names) having a second byte of \x7b, could have caused access violations or application errors in client applications. A workaround is to use double quotes to quote the object names. This problem is now fixed. ================(Build #4233 - Engineering Case #313708)================ If the fetch of a row from a result set resulted in some sort of error (eg. conversion error), this error was suppressed by the provider and the rowset was marked as having no more rows. Now the error is properly propogated back to the client. ================(Build #4234 - Engineering Case #311280)================ When querying the datatype of TIME, DATE, or TIMESTAMP columns of an ASA database, the ASA provider returned different values than Microsoft's provider, MSDASQL. This has now been corrected. ================(Build #4241 - Engineering Case #301502)================ When an OLE DB schema rowset is opened to retrieve the parameter information, the ASA provider executes the stored procedure 'sa_oledb_procedure_parameters' which takes four parameters 'inProcedureCatalog', 'inProcedureSchema', 'inProcedureName' and 'inParameterName'. If the 'inProcedureSchema' parameter was not specified by, (such as is done by Delphi applications), the default value of 'current user' was used. If this was not the same as the user that created the procedure, no records would have been returned. This is now fixed by changing the default value of 'inProcedureSchema' to the empty string (''). ================(Build #4243 - Engineering Case #314977)================ The OLEDB provider had a number of problems when used it with a Borland Delphi built application: - the provider could have overrun memory when fetching 200 bytes or less into a buffer smaller or the same size as the actual data, when fetching binary data into DBTYPE_VARIANT or any data into DBTYPE_STR or DBTYPE_BYTES. This could have caused the application to crash as well as other problems. - the provider could have used an incorrect length when getting data from parameters of type DBTYPE_VARIANT containing DBTYPE_ARRAY. This could have caused the wrong length of data to be used and possibly the application to crash. - NULL binary input parameters may have resulted in E_OUTOFMEMORY - pessimistic locking was used when optimistic locking should have been used, resulting in reduced concurrency and possible application blocking. These problems have now been fixed. In 7.0.4 and 8.0.2, the locking type has not been changed since an 8.0.0 or higher engine is required and the change can cause the engine to choose a different cursor type. ================(Build #4246 - Engineering Case #317126)================ When using an OLE DB RowsetViewer with an OLE DB Tables schema rowset ( or other schema rowsets ), without setting the TABLE_SCHEMA restriction (or other SCHEMA restrictions), the returned rowset only contained entries created by the current user, the other entries are missing. This has now been fixed. ================(Build #4248 - Engineering Case #317604)================ When an ADO recordset which returned multiple resultsets was opened, fetching the second resultset would have caused the application to crash. This problem, which has now been fixed, was introduced by the change for QTS 310101. ================(Build #4269 - Engineering Case #320668)================ When an OleDbDataReader was open on a connection to a Japanese database (Default collation=932JPN), string values were truncated when fetched. The length of the returned strings was taken as the number of characters, when it should be the number of bytes. This has now been corrected. ================(Build #4284 - Engineering Case #323019)================ When running a query with a prepared command, the ASA Provider created an internal rowset which was never freed, causing a memory leak. This was fixed by deleting the internal rowset when the owning command object is released. ================(Build #4294 - Engineering Case #318938)================ If an application using the OLEDB driver read a bitmap from a longbinary column and wrote it to a file, the application would likely have crashed. If the longbinary column had length N, then the driver copied N+1 bytes, changing a byte in memory that it did not own. This has been fixed. ================(Build #4294 - Engineering Case #326758)================ If an ADO application attempted to fetch and display columns that contained unsigned, tinyint, or bigint (64 bit) values, an error could have occurred or an incorrect value could have been displayed. These included the following types and sample values: tinyint 255 bigint 9223372036854775807 unsigned bigint 18446744073709551615 unsigned int 4294967295 unsigned smallint 65535 A tinyint type was treated as a signed value when it is not. A bigint type was treated as a 32-bit value when it is not. An unsigned bigint type was treated as a signed, 32-bit value when it is not. An unsigned int type was treated as a signed value when it is not. An unsigned smallint type was treated as a signed value when it is not. These datatypes are now handled correctly. ================(Build #4296 - Engineering Case #327019)================ When an application using the OLEDB driver was connected to a database with the Turkish collation, (1254TRK), some calls to get metadata would have failed. This problem has now been fixed. ================(Build #4296 - Engineering Case #327081)================ The error 'Count field incorrect' could have occurred when executing an UPDATE statement command and setting a binary column to the value of a variable. This is nowfixed. ================(Build #4304 - Engineering Case #323298)================ THe ASA Provider held locks and kept cursors open after they were closed, if it was called from OLEDB.NET provider. The internal ODBC cursor is now closed when the OLEDB rowset is closed. ================(Build #4312 - Engineering Case #331652)================ Output and variant type parameters were not supported by the OLEDB driver. The following C++ example contains both variant type parameters and output parameters. class CInP1OutP2Accessor { public: CComVariant m_varP1; CComVariant m_varP2; BEGIN_PARAM_MAP(CInP1OutP2Accessor) // SET_PARAM_TYPE( DBPARAMIO_INPUT ) // Default COLUMN_ENTRY_TYPE(1, DBTYPE_VARIANT, m_varP1) SET_PARAM_TYPE( DBPARAMIO_OUTPUT ) COLUMN_ENTRY_TYPE(2, DBTYPE_VARIANT, m_varP2) END_PARAM_MAP() }; When variant type parameters were used, the OLEDB driver would have failed with an assertion error. The OLEDB driver would not have returned the proper value for an output parameter. These problems have now been fixed. ================(Build #4319 - Engineering Case #324972)================ A Visual Basic application using the OLEDB driver could have failed with the error "Run-time error '-2147467259 (80004005)': Unspecified error" if the function DoEvents was called. The dboledbax.dll is a COM object, thus has an entry point DLLCanUnloadNow(), which is called infrequently by Visual Basic, whenever DoEvents is called. Each time it was called though, the routine would have returned TRUE (meaning "it is OK to be unloaded"). Eventually, Visual Basic would have unloaded the DLL, even though it was still in use. This has now been fixed. Calls to DLLCanUnloadNow() will now only return TRUE when the DLL can safely be unloaded. ================(Build #4321 - Engineering Case #326505)================ A client application could have crashed when preparing and executing an oledb command object to open a rowset. This is now fixed. ================(Build #4323 - Engineering Case #326619)================ An application using the ASA provider was not able to get DBPROPSET_DATASOURCEINFO when using DataLinks. This problem has been fixed. ================(Build #4323 - Engineering Case #333503)================ If the ORDER BY list of a query referred to a constant select list item (ie SELECT 1 as C1, C2 ... ... ORDER BY 1,2) and that same select list item was also used in a GROUP BY clause, then the server may have crashed instead of ignoring the constant order by item. This problem has now been resolved. ================(Build #4324 - Engineering Case #333438)================ The ASA provider would not have written the correct binary value to a column when the type of the column was a binary type (e.g., BINARY(10), UNIQUEIDENTIFIER, etc.) and the column length was less than 100 bytes. This is now fixed. ================(Build #4330 - Engineering Case #333924)================ Beginning with version 8.0.2, unique identifier support was added to Adaptive Server Anywhere. A column can be typed as a "uniqueidentifier", which is a 16-byte binary value. A uniqueidentifier column was being typed as SQL_BINARY, but now that support specifically for uniqueidentifier columns has been added, (in conformance with the ODBC 3.5 specification), a uniqueidentifier column will now be identified as SQL_GUID and columns can now be bound as SQL_GUID. Many ODBC functions, such as SQLDescribeCol, SQLGetTypeInfo, and SQLBindCol, are affected by this change. Uniqueidentifier columns can be bound as SQL_C_CHAR or SQL_C_WCHAR. When this is done, binary uniqueidentiers (SQL_C_GUID) are converted from binary to the uniqueidentifier string form with hyphens. For example, the 16-byte binary value 0x41dfe9efdb9111d28c43006008d26a6f is converted to and from the 36-byte character string "41dfe9ef-db91-11d2-8c43-006008d26a6f". If the bind type is SQL_C_WCHAR, the resulting string is 72 bytes in length. Also, SQLGetInfo() with SQL_CONVERT_GUID is now supported, and SQLGetInfo() with SQL_CONVERT_xxx now reports all the conversions permissable with the CONVERT function. Previously, only a small subset of the permissable conversions was reported. ================(Build #4340 - Engineering Case #337627)================ When using the OLEDB driver to fetch data from char columns with 200 or more characters, the last character would have beentruncated. This has been fixed. ================(Build #4350 - Engineering Case #339903)================ When calling a procedure with a output parameter bound as a NUMERIC or DECIMAL, 0 may have been returned to the application rather than its actual value. This problem would have manifested itself in the ODBC driver as well. This problem has been fixed. ================(Build #4356 - Engineering Case #340046)================ An exception could have occurred when moving through a result set that contained rows with column lengths 200 bytes or greater. For example, (assume the following table contains entries with the NOTES column containing 400 characters): create table TBLVARCHAR ( ID unsigned bigint not null, NOTES long varchar, primary key (ID) ); The following is a VB example that selects from this table: rs.Open "SELECT * FROM tblVARCHAR", conn, adOpenStatic, adLockReadOnly ' loop through all recordsets Do While Not rs.EOF For i = 0 To 1 Debug.Print rs.Fields(i).Name, TypeName(rs.Fields(i).Value), rs.Fields(i).Value Next rs.MoveNext Loop rs.Close This problem has been fixed. The GetRowsAt() method now handles long columns. ================(Build #4362 - Engineering Case #341458)================ If an ADO application fetched a binary column into a variable of type VARIANT, only 16 bytes would have been stored. Also, for a non-variant DBTYPE_ARRAY variable, the length was incorrectly set to zero, which meant that no data would have been copied. These problems have now been fixed. ================(Build #4363 - Engineering Case #339783)================ An ADO application would not have fetched columns with type UNIQUEIDENTIFIER. This was due to IColumnsInfo::GetColumnInfo returning DBTYPE_EMPTY rather than DBTYPE_GUID for UNIQUEIDENTIFIER columns. This has been fixed. ================(Build #4367 - Engineering Case #343472)================ An attempt to insert a null value into a binary column, would resulted in an access violation. This has been fixed. ================(Build #4370 - Engineering Case #344137)================ Using the OLEDB driver, a conversion of a value of type DBTYPE_IUNKNOWN to a value of type DBTYPE_STR would have failed. This problem could have occured if a column was of type adLongVarWChar as in the following Visual Basic example: If rsTempSource.Fields(strFieldName).Type = ADOR.DataTypeEnum.adLongVarWChar Then rsTempTarget.Fields(strFieldName).Value = Trim(rsTempSource.Fields(strFieldName).Value) rsTempTarget.UpdateBatch() End If Binding would have failed for a column of this type resulting in a "Count field incorrect" error. This problem has been corrected. ================(Build #4373 - Engineering Case #342915)================ If Microsoft OLEDB support is not installed, a C++ application that uses the ASA OLEDB driver will fail in the call to CoCreateInstance. The failure code from CoCreateInstance does not give any indication as to the source of the problem. Below is a sample C++ call to CoCreateInstance to initialize the ASA OLEDB provider. CLSIDFromProgID(T2COLE(_T("ASAProv")), &clsid); hr = CoCreateInstance( clsid, NULL, CLSCTX_INPROC_SERVER, IID_IDBInitialize, (void**)&m_pIDBInitialize); This problem is likely to occur on a Pocket PC 2003 device. The Pocket PC 2003 SDK (eg, \WinCE Tools\wce420\Pocket PC 2003) does not include the Microsoft Data Access 3.1 modules (like msdaer.dll, msdaeren.dll) that are present in older SDKs like the Pocket PC 2002 SDK (e.g., \WinCE Tools\wce300\Pocket PC 2002\dataaccess31\target\arm). To help diagnose the problem, the ASA OLEDB provider has been changed to display a message box when it cannot access the Microsoft OLE DB Error Collection Service module. The title of the message box is "Fatal Error". The interior text of the message box will state something like "CoGetClassObject(CLSID_EXTENDEDERRORINFO) 0x8007007e ProgID: MSDAER.1". The hexadecimal number is the error code returned by CoGetClassObject(). In this example, the programmatic identifier associated with CLSID_EXTENDEDERRORINFO is "MSDAER.1". The settings for CLSID_EXTENDEDERRORINFO can be examined in the system registry under HKEY_CLASSES_ROOT\CLSID\{C8B522CF-5CF3-11CE-ADE5-00AA0044773D}. Included is the path for the Microsoft OLE DB Error Collection Service module. This information can then be used to help determine if the required module is present on the system. ================(Build #4390 - Engineering Case #345015)================ When a CHAR or VARCHAR column contained the empty string (a string of length 0) and the data was fetched into a variant of type BSTR, the OLEDB provider did not convert the result into a proper null-length BSTR. The pointer to the string value would have been uninitialized and this could have resulted in an application crash. This has now been fixed. ================(Build #4399 - Engineering Case #350551)================ When data was inserted using the OLEDB provider into a column with a datatype such as "long varchar", "text", "long binary", "image" or "long varbinary", which have a maximum length of 2 Gbytes, the data may have been truncated at 4 bytes. This problem has now been fixed. ================(Build #4400 - Engineering Case #351094)================ The OLEDB driver would almost always treat the database as if it was the 1252 codepage charset. In order to determine the character set of the database to which it was connected, the OLEDB driver queried the server for the collation name. It then used this collation name to search a table of codepage charset names. This was incorrect, as for the most part, collation names (e.g., "1252LATIN1") are not the same as charset names (such as "cp936", "cp1252", and so on). There are some exceptions however. The collation names "sjis", "utf8", and "iso_1" are the same as the charset name, so for these character sets, the problem would not appear. When the search routine did not find the collation name, it would default the charset to 1252. All application data is converted from UNICODE to the database charset, thus all application data was being converted to 1252, perhaps incorrectly. This problem has been corrected, the correct charset is noe used. ================(Build #4402 - Engineering Case #344732)================ If a row was added to a recordset with an autoincremented primary key, the new autoincremented value was not updated in the recordset. This has been fixed for server-side keyset and dynamic cursors. The following server-side cursors support refetching of column values: keyset, dynamic, and static. Forward-only cursors are not supported. Due to the way ADO interacts with the OLEDB provider, no client-server cursors support refetching of the columns. ================(Build #4409 - Engineering Case #348794)================ Attempting to put a Unicode (wide character) string into a column that had a datatype of char, varchar, binary or varbinary, via a parameterized INSERT statement, would have resulted in garbage characters being placed into the column. A work around is to explicitly set the type to DbType.AnsiString The following C# fragment illustrates the problem. IDbCommand cmd = dbConnection.CreateCommand(); cmd.CommandText = "insert into t ( value,value2 ) values (?,?)"; IDbDataParameter param1 = cmd.CreateParameter(); IDbDataParameter param2 = cmd.CreateParameter(); // uncomment this line for workaround // param1.DbType = DbType.AnsiString param1.Value = "ABC\x00"+"DEFG"; param2.Value = "ABCD\x00"+"EFG"; cmd.Parameters.Add(param1); cmd.Parameters.Add(param2); cmd.ExecuteNonQuery(); cmd.Dispose(); This has been fixed. ================(Build #4409 - Engineering Case #351298)================ After calling a procedure that returned more than one result set, attempting to move to the next result set using ADO's NextRecordset() method, would always have returned Null. This problem has been fixed. The following Visual Basic code fragment illustrates the problem (the stored procedure mysp() returns two result sets): adors.Open("call mysp()", adocon, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockReadOnly, ADODB.CommandTypeEnum.adCmdText) Label1.Text = adors.Fields(1).Value adors = adors.NextRecordset() <--- adors was always Null after this Label1.Text = adors.Fields(1).Value ================(Build #4417 - Engineering Case #354221)================ The following changes have been made to the OLEDB provider's Rowset property set DBPROPSET_ROWSET. The following Rowset properties were returning TRUE, indicating that the associated interface was supported. They now return FALSE, to indicate that the corresponding interfaces are not supported. DBPROP_IChapteredRowset DBPROP_IParentRowset DBPROP_IRowsetFind DBPROP_IRowsetIndex DBPROP_IRowsetRefresh DBPROP_IRowsetResynch The Rowset property DBPROP_IRowsetIdentity, was returning TRUE, although the IRowsetIdentity interface was not supported. The IRowsetIdentity interface is now implemented. The property continues to return TRUE. The following properties have been removed from the Rowset properties, as they are not Rowset properties, they are View properties. DBPROP_IViewChapter DBPROP_IViewFilter DBPROP_IViewRowset ================(Build #4417 - Engineering Case #354317)================ The following changes have been made to correct problems in metadata reporting: The Schema Rowset returned for DBSCHEMA_TABLE_CONSTRAINTS has been corrected. The Schema rowset for DBSCHEMA_PROVIDER_TYPES now includes the types DBTYPE_R4 (FLOAT), DBTYPE_R8 (DOUBLE), and DBTYPE_GUID (UNIQUEIDENTIFIER). The type TINYINT is now described as signed, previously it was described as unsigned. The MAXIMUM_SCALE for DECIMAL and NUMERIC was NULL instead of 127. The MAXIMUM_SCALE for the SMALLINIT, TINYINT and INTEGER types is now NULL, not 0. Schema Rowsets that returned column type information did not include support for the DBTYPE_GUID (UNIQUEIDENTIFIER) type, now they do. In order to implement these changes, the stored procedures in scripts\oleschem.sql must replace the stored procedures in the database. ================(Build #4419 - Engineering Case #354778)================ The following changes have been made to correct problems in metadata reporting: The IDBSchemaRowset::GetSchemas method now correctly returns bit masks rather than argument counts to indicate which restriction parameters are supported. When using linked tables with Microsoft SQL Server 2000 Distributed Queries, this problem manifested itself with the message "OLE DB provider 'ASAProv.xxx' returned an invalid schema definition". The DBSCHEMA_TABLES_INFO Schema Rowset used by Microsoft SQL Server 2000 Distributed Queries is now supported. The stored procedures that implement the schema rowsets have been updated so that "uniqueidentifier" is used rather than "UNIQUEIDENTIFIER" . The phrase "not transactional" in the sa_oledb_tableconstraints stored procedure has been changed to "on commit preserve rows". To install the revised schema support, the stored procedures in scripts\oleschem.sql must replace the stored procedures in the database. ================(Build #4433 - Engineering Case #350319)================ When using the Microsoft Query Analyzer with Microsoft SQL Server 2000 to issue a query on a Linked Server definition that referenced an ASA server, an error such as the following would have been reported: Server: Msg 7317, Level 16, State 1, Line 1 OLE DB provider 'ASAProv.80' returned an invalid schema definition. For example: select * from ASA8.asademo.dba.customer where "ASA8" is the name of the Linked Server, "asademo" is the catalog name, "dba" is the schema name and "customer" is the table name. This problem has been fixed, but the following must also be done in order to support a Linked Server query: - When the Linked Server is defined, "Provider Options" must be selected. (this button is greyed out and unusable once the Linked Server has been defined). In the Provider Options dialog, the "Allow InProcess" option must be selected. - ASA does not support catalogs, so the four part table reference must omit the catalog name (two consecutive periods with no intervening characters, ie select * from ASA8..dba.customer). Including a catalog name will result in the error: "Invalid schema or catalog specified for provider 'ASAProv.80'" - The database must be updated to include the revised stored procedures found in the scripts\oleschem.sql directory. This file includes a new stored procedure dbo.sa_oledb_tables_info that is required for Linked Server support. ================(Build #4437 - Engineering Case #358843)================ A memory leak occurred in the OLEDB provider, ASAProv, when a repeated sequence of calls to SetCommandText(), Prepare(), and GetColumnInfo() was executed. These calls could be generated by an ADO Open() call with a SELECT statement containing a number of table JOINs. This problem has now been fixed. ================(Build #4439 - Engineering Case #359675)================ When a binary array of bytes was inserted into a binary column using the OLEDB provider "ASAProv", the data was converted to a hexadecimal string and stored into the binary column. For example: BYTE m_lParm1[2]={0x10,0x5f); would have been stored as the binary value 0x31303566 which is the original binary value stored as a hexadecimal string of characters. This has been fixed so that parameters are not converted from the user's type to a string. Instead, bound parameters are converted to the type specified by the application. ================(Build #4441 - Engineering Case #360196)================ The ASA OLEDB provider ASAProv did not return the correct error codes as documented by Microsoft. For example, the ICommand::Execute method should have returned DB_E_INTEGRITYVIOLATION when a literal value in the command text violated the integrity constraints for a column, but was returning E_FAIL. This has been corrected. The following additional error codes are also now returned: DB_E_NOTABLE DB_E_PARAMNOTOPTIONAL DB_E_DATAOVERFLOW DB_E_CANTCONVERTVALUE DB_E_TABLEINUSE DB_E_ERRORSINCOMMAND DB_SEC_E_PERMISSIONDENIED ================(Build #4444 - Engineering Case #360678)================ ADO applications using the ASA OLEDB provider, ASAProv, could have failed with an "invalid rowset accessor" error. The following Visual Basic code example demonstrates the problem: Dim conn As new OleDbConnection() Dim cmd As OleDbCommand Dim reader As OleDbDataReader Try conn.ConnectionString = "Provider=ASAProv;uid=dba;pwd=sql;eng=asademo" conn.Open() cmd = New OleDbCommand("SELECT * FROM DEPARTMENT", conn) reader = cmd.ExecuteReader() While reader.Read() Console.WriteLine(reader.GetInt32(0).ToString() + ", " _ + reader.GetString(1) + ", " + reader.GetInt32(2).ToString()) End While reader.Close() reader = Nothing conn.Close() conn = Nothing Catch ex As Exception MessageBox.Show(ex.Message) End Try This problem has been fixed, the rgStatus array passed to the IAccessor::CreateAccessor method is now correctly initialized. ================(Build #4450 - Engineering Case #361464)================ This change fixes several problems with the DBSCHEMA_INDEXES rowset, implemented by the sa_oledb_indexes stored procedure. The COLLATION column was always empty. It now contains a 1 for ASCENDING ordering and a 2 for DESCENDING ordering. The CLUSTERED column was always TRUE, even for a non-clustered index. This column now contain 0 unless the index is clustered, in which case it will contain a 1. The INDEX_NAME column contained the additional string "(primary key)" when the index was based on a primary key. In the DBSCHEMA_PRIMARY_KEYS rowset (implemented by the sa_oledb_primary_keys stored procedure), the PK_NAME column does not contain this string. Since the names were different, it was difficult to join the information in these two tables. Elsewhere the index name is reported using only the table name (in access plans for example). For these reasons, the INDEX_NAME column will no longer contain the string "(primary key)". The following column names have been corrected: FKTABLE_CAT is now FK_TABLE_CATALOG FKTABLE_SCHEMA is now FK_TABLE_SCHEMA PKTABLE_CAT is now PK_TABLE_CATALOG PKTABLE_SCHEMA is now PK_TABLE_SCHEMA These corrections are to the "oleschema.sql" file located in the "scripts" folder, which will be in effect for newly created databases. To implement the corrections to an existing database, connect to the database with Interactive SQL dbisql and run the contents of "oleschema.sql". ================(Build #4451 - Engineering Case #362198)================ In the COLUMNS, PROCEDURE_PARAMETERS and PROCEDURE_COLUMNS rowsets, the CHARACTER_MAXIMUM_LENGTH column contained incorrect values for BIT and LONG VARCHAR/LONG VARBINARY columns and parameters. This column should contain the maximum possible length of a value in the column. For character, binary, or bit columns, this is one of the following: 1) The maximum length of the column in characters, bytes, or bits, respectively, if one is defined. For example, a CHAR(5) column in an SQL table has a maximum length of five (5). 2) The maximum length of the data type in characters, bytes, or bits, respectively, if the column does not have a defined length. 3) Zero (0) if neither the column nor the data type has a defined maximum length. 4) NULL for all other types of columns. As well, the CHARACTER_OCTET_LENGTH column contained incorrect values for LONG VARCHAR/LONG VARBINARY columns and parameters. The CHARACTER_OCTET_LENGTH column should contain the maximum length in bytes of the parameter if the type of the parameter is character or binary. A value of zero means the parameter has no maximum length. NULL for all other types of parameters. In the PROCEDURE_COLUMNS and PROCEDURE_PARAMETERS rowsets, the column name should have been CHARACTER_OCTET_LENGTH rather than CHAR_OCTET_LENGTH. In the PROVIDER_TYPES rowset, the COLUMN_SIZE column contained incorrect values for LONG VARCHAR/LONG VARBINARY types. These problems have been corrected and will appear in the "oleschema.sql" file located in the "scripts" folder once the EBF has been applied. To implement the corrections to an existing database, connect to the database with Interactive SQL (dbisql) and run the contents of "oleschema.sql". ================(Build #4451 - Engineering Case #362207)================ In the FOREIGN_KEYS rowset (implemented by the sa_oledb_foreign_keys stored procedure), the DEFERRABILITY column contained the values 5 or 6. This column should contain one of the following: DBPROPVAL_DF_INITIALLY_DEFERRED 0x01 DBPROPVAL_DF_INITIALLY_IMMEDIATE 0x02 DBPROPVAL_DF_NOT_DEFERRABLE 0x03 These corrections will appear in the "oleschema.sql" file located in the "scripts" folder once the EBF has been applied. To implement the corrections to an existing database, connect to the database with Interactive SQL and load and run the contents of "oleschema.sql". ================(Build #4452 - Engineering Case #362011)================ The OLEDB provider ASAProv assumed that DBTYPE_BOOL values were 1 byte long. So for database columns of type BIT, it would indicate that only 1 byte needed to be allocated for a DBTYPE_BOOL column. This was incorrect, since DBTYPE_BOOL values are actually 2 bytes long. Any consumer application that fetched 2 bytes for a DBTYPE_BOOL column, (such as applications based on Borland's Delphi), and examined both bytes, would have obtained an incorrect result. Also columns adjacent to DBTYPE_BOOL columns will overlap in memory. This has been fixed. ================(Build #4484 - Engineering Case #369016)================ When an application using the OLEDB driver provided a DBTYPE_DECIMAL parameter with over 15 digits, the most significant digits would have been lost. For example, if the value 1234567890.123456 was provided as a DBTYPE_DECIMAL parameter, this would have been incorrectly interpreted as 234567890.123456 (the leading 1 would be lost). In particular, this could affect Visual Basic applications using an OleDbDataAdapter on a query with a numeric or decimal typed column, and a generated DataSet. The problem has now been fixed. ================(Build #4485 - Engineering Case #368574)================ The execution of a SELECT statement containing JOINs of several tables by applications using the OLEDB provider ASAProv, would have resulted in a memory leak. This has been fixed. ================(Build #4485 - Engineering Case #369272)================ A call to IRowsetChange::InsertRow() in the OLEDB provider, ASAProv, results in a crash. This call can be made from C++ using a simple table insert: CTable<CAccessor<CSimpleAccessor> > dbSimple; hr = dbSimple.Insert(1); This problem has been fixed. ================(Build #4487 - Engineering Case #369072)================ When using the OLEDB provider ASAProv, String parameters may not have been passed correctly to stored procedures. This problem has been fixed. The following Visual Basic example calls a stored procedure with a String parameter. Dim sendParam1 As String sendParam1 = "20040927120000" Dim cmd As ADODB.Command cmd = New ADODB.Command With cmd .CommandText = "testproc1" .CommandType = ADODB.CommandTypeEnum.adCmdStoredProc .ActiveConnection = myConn .Prepared = True .Parameters(0).Value = sendParam1 Call .Execute() End With An example of a stored procedure follows. ALTER PROCEDURE "DBA"."testproc1" (in param1 varchar(30)) BEGIN message 'in Parameter [' + param1 + ']'; END

Adaptive Server Anywhere - Other

================(Build #3609 - Engineering Case #303115)================ If a procedure had an OUT paramter of type binary, long binary, varchar or longvarchar then attempting to execute the procedure using the JDBC-ODBC bridge would not have worked. This problem has now been fixed. ================(Build #3609 - Engineering Case #303208)================ If a procedure had an INOUT parameter, then executing the procedure using the JDBC-ODBC bridge would have resulted in an error. ================(Build #4076 - Engineering Case #299546)================ If executing a statement resulted in a long error message being returned from the server, then retrieving that error message using the JDBC-ODBC bridge would likely have crashed the application or resulted in very strange behaviour. This problem has now been fixed. ================(Build #4085 - Engineering Case #300775)================ Attempting to apply an EBF on machines having only the Client portion (i.e., no database server) of Adaptive Server Anywhere installed would have failed. This has been fixed. ================(Build #4088 - Engineering Case #302180)================ When using the JDBC-ODBC bridge, calls to PreparedStatement.getMetaData() were returning null all the time. This is now fixed. ================(Build #4093 - Engineering Case #303297)================ If a parameter or column was fetched as numeric and then retrieved as bigdecimal, the bridge fails to convert the value correctly. Ths problem has now been fixed. ================(Build #4094 - Engineering Case #303656)================ The JDBC-ODBC bridge did not properly handle OUT parameters of type TIME, DATE and TIMESTAMP. Sometimes a strange error message may have been thrown when retrieving the OUT paramter, while at other times an unexpected result would have been retrieved. This problem has been fixed. ================(Build #4094 - Engineering Case #303657)================ When using the JDBC-ODBC bridge, if a parameter was of type INT, SMALLINT, TINYINT, BIGINT, BIT, REAL, DOUBLE or FLOAT and had the value NULL, then calling getObject would have returned the value 0 instead of returning a null object. This problem has now been fixed. ================(Build #4097 - Engineering Case #304086)================ When using the JDBC-ODBC bridge, a race condition could have occurred when calling the following methods, if JDBC objects created on the same connection were used concurrently on different threads: - IStatement.getColStrAttr - IResultSetMetaData.getCatalogName - IResultSetMetaData.getColumnLabel - IResultSetMetaData.getColumnName - IResultSetMetaData.getColumnTypeName - IResultSetMetaData.getSchemaName - IResultSetMetaData.getTableName This could have resulted in wrong results or crashes. The problem is now fixed ================(Build #4098 - Engineering Case #304495)================ When using DBISQL and the JDBC-ODBC bridge any attempts to execute a batch with variying multiple result sets would have failed. For example: begin select 1,2; select 3 end This problem has now been fixed. ================(Build #4122 - Engineering Case #325034)================ Install on a device running Windows CE 4.1 would have failed. This was due to the INF file used by CE Application manager only supported versions up to 4.0. Version 4.1 did not exist when 8.0.2 originally shipped. This has now been fixed. There are two work around options: 1) Install ASA 8.0.2 for Windows CE on the desktop machine, but choose _NOT_ to deploy to the device. Then install an EBF for ASA for Windows CE, build 4122 or later, which will allow the install to the device toc work correctly. 2) Edit <ASA_DIR>\ce\asa_ce.inf with a text editor In each of the following sections, change "VersionMax" to something larger than 4.1 ( for example, 5.0 ) --------------------------------------------------------------------- [CEDevice.MIPS.30] ; for MIPS processor ProcessorType = 4000 ; processor value for MIPS R3900 VersionMin = 3.0 VersionMax = 4.0 <-- change this to 5.0 [CEDevice.ARM.30] ; for StrongARM processor ProcessorType = %ArmProcessor% ; processor value for ARM VersionMin = 3.0 VersionMax = 4.0 <-- change this to 5.0 [CEDevice.X86.30] ; for X86 processor ProcessorType = x86 ; VersionMin = 3.0 VersionMax = 4.0 <-- change this to 5.0 --------------------------------------------------------------------- ================(Build #4200 - Engineering Case #304465)================ The system procedures sp_tsql_environment and sp_reset_tsql_environment were setting options using option names that did not match the case in the SYSOPTION system table. This caused problems with databases created with certain collations. These procedures have now been changed to use option names with a case matching those in the SYSOPTION table. ================(Build #4204 - Engineering Case #305860)================ If a result set had a column of type unsigned smallint, unsigned int or unsigned bigint, and the value of the column was greater than the largest smallint, int or bigint (respectively), then retrieving the column using the ASA JDBC-ODBC bridge would have resulted in a "value out of range error". This problem has now been fixed. ================(Build #4206 - Engineering Case #306157)================ If a user disconnected from Sybase Central, which had been connected to a database server via the JDBC-ODBC bridge, and had selected from a table and viewed its data, Sybase Central would have quietly exited. This problem has now been fixed. ================(Build #4214 - Engineering Case #307606)================ When upgrading to a new minor release of Adaptive Server Aanywhere, after having applied an EBF to the previous version where the EBF was newer than the minor version being installed, the performance counters could have failed to install correctly. During installation, the user may see an error message such as "unable to register dbctrs8.dll: -4". For example, if a user installed 8.0.1 GA followed by 8.0.1.3080 EBF, then upgraded to 8.0.2 GA, the installation may fail because 8.0.1.3080 EBF is newer than 8.0.2GA. This is now fixed, but the problem may be worked around by deleting the dbctrs8.ini and sqlactnm.h files in the win32 directory before installing 8.0.2 GA. ================(Build #4214 - Engineering Case #309074)================ When connected via the JDBC-ODBC bridge, if an output parameter was registered as DECIMAL and then subsequently fetched using getBigDecimal, the bridge would have thrown a "Rounding Necessary" error, instead of properly returning the output parameter. This is now fixed. ================(Build #4217 - Engineering Case #309682)================ When starting the MobiLink Notifier in an environment where the default locale language was either German or French, would have caused the exception "java.util.MissingResourceException". This problem is now fixed. A workaround is to execute java.util.Locale.setDefault( new Locale( "en" ) ) in a static initializer in the first class listed in the StartClasses or by some other mean for changing the default locale for the JVM instance (e.g. setting System.properties in java code or using the -D switch. Please see, Sun's documentation) ================(Build #4223 - Engineering Case #310912)================ When using the JDBC?ODBC bridge, warnings were not always being reported back to the application. For example, using DBISQL connected via the JDBC-ODBC bridge, executing the following: set temporary option ansinull = 'on'; select count(NULL) from dummy; will cause an warning dialog "null value eliminated in aggregate function". Executing the following statement: select top 10 * from rowgenerator; would have return no. This problem has now been fixed. ================(Build #4239 - Engineering Case #314893)================ When using Java to write MobiLink synchronization logic, if the connection to the MobiLink server used the JDBC-ODBC bridge, a fetched timestamp could have had an incorrect value. In particular, the value would have been wrong if the timestamp column in the database had non-zero milliseconds. This has now been fixed. ================(Build #4250 - Engineering Case #318140)================ If the method ResultSet.getAsciiStream was used to get an AsciiStream of a string column (char, varchar or long varchar), the AsciiStream returned would not have given the proper ascii representation of the string. This is now fixed. ================(Build #4251 - Engineering Case #318321)================ The JDBC-ODBC bridge was not handling conversions from float to integer correctly. If setObject was used with an object type of float or double and a target SQL type of integer, smallint or bigint, calling executeUpdate would sometimes have incorrectly failed with a conversion error. This problem has now been fixed. In the cases where the conversion error is valid (as in an overflow or underflow case) the error is still returned as expected. ================(Build #4252 - Engineering Case #318486)================ If Connection.createStatement or Connection.prepareStatement was used without specifying a particular result set type and concurrency, then the bridge would have used a default result set type of scroll sensitive, instead of forward only (as specified by the JDBC specification). The bridge now defaults to forward only. Note that the concurrency was, and still is, read only (as specified by the JDBC specification). ================(Build #4256 - Engineering Case #319724)================ When setting an unknown property at connection time, the JDBC-ODBC bridge would have throw an exception. The bridge now ignores the property, which is the behaviour of the Sun bridge. ================(Build #4268 - Engineering Case #315656)================ The shortcut to the sample database installed on Japanese Windows CE machines was referencing asademoj.db, instead of asademo.db. This has now been corrected. ================(Build #4303 - Engineering Case #329001)================ An embedded SQL application may have crashed with SIGBUS on 64-bit UNIX platforms or received the error "SQL ERROR (-758) SQLDA data type invalid". The SQL preprocessor was generating the sqldabc field in the SQLDA structure incorrectly for 64-bit platforms. This has now been fixed. Workaround: use the flag -DLONG_IS_64BITS when compiling 64-bit embedded SQL application. ================(Build #4334 - Engineering Case #313392)================ If the GA install of SQL Anywhere did not use the default Start Menu folder, (ie Programs\SybaseSQL Anywhere xx), subsequent EBFs would have created this folder. This has been corrected, no folder is created by the EBF. ================(Build #4343 - Engineering Case #340071)================ Updating a Runtime installation with an EBF, would not have updated the runtime engine, but would have installed the Personal Server. This has now been fixed. ================(Build #4354 - Engineering Case #340371)================ If the ASA installation location was anything other than the default location and the HKey_Local_Machine\Software\Adaptive Server Anywhere\x.0\Location registry key was empty or incorrect, an EBF install would not have detected the presence of an existing install and would have failed. This has been fixed. ================(Build #4376 - Engineering Case #345909)================ There was a change in the a_sync_db structure in version 9.0.1, which meant that any application built with 9.0.0, would have failed with an Access Violation crash, when calling the 9.0.1 DBSynchronizeLog function. This problem has now been corrected. To work around this problem, the 9.0.0 application must be rebuilt with 9.0.1 software. In particular, it is important to specify the correct version of the DBTOOLS library when setting up the a_sync_db structure: dbSyncStruct.version=9000; // is the wrong way to initialize this field dbSyncStruct.version=DB_TOOLS_VERSION_NUMBER; // is the correct way This problem affects any application built with 9.0.0 and deployed with 9.0.1 installed, and any application built with 9.0.1 and deployed with 9.0.1 installed if the wrong version number is specified in the a_sync_db structure. These applications must be re-built with the 9.0.1 dbtools library and they must specify the correct DBTOOLS version number as shown above. ================(Build #4485 - Engineering Case #369278)================ The stored procedure sp_jdbc_stored_procedures is used by jConnect to retrieve stored proc metadata. Unfortunately the definition of the stored procedure was incorrect and the PROCEDURE_TYPE column of the metadata result set was returning whether or not the particular stored proc returned a result set. In actuality, the PROCEDURE_TYPE column should return whether or not the particular stored proc returns a return value. This procedure has now been corrected. Note, new databases will have the corrected procedure, but to update existing databases, run the Upgrade utility dbupgrad.

Adaptive Server Anywhere - Server

================(Build #3602 - Engineering Case #299872)================ In some circumstances when a connection was established while the server was shutting down the server could crash. Database files are not affected. This affected UNIX servers only and has been fixed. ================(Build #3602 - Engineering Case #300128)================ The minimum cache size calculated by a server running on a Windows platform would have been different from one running on a UNIX platform. This change makes the behaviour consistent. Assuming that no -cl parameter was specified when starting a server: 1) Prior to this change, if -c was specified, a Windows server would set the min cache size to be the same value as the -c value (i.e. the same as the initial value) whereas a UNIX server would make the min cache size 2MB. This change makes all platforms use the Windows behaviour in this situation: min cache size is the same as the initial cache size. 2) Prior to this change, if _no_ -c was specified, the initial cache size is computed by the server to be an appropriate size based on the size of the database(s) being started. A Windows server would use this initial cache size value as the minimum cache size, whereas a UNIX server would make the min cache size 2MB. This change makes all platforms set the minimum cache size to a platform-specific minimum value as follows: CE: 600K, all other Windows platforms: 2M, all UNIX platforms: 8M ================(Build #3602 - Engineering Case #300231)================ When multiple threads running Java code tried to disconnect at about the same time, a thread deadlock was possible. This has been fixed. ================(Build #3603 - Engineering Case #300401)================ Running the dbexpand utility on Unix platforms, was taking a long time to expand a compressed database file. This has now been greatly improved. ================(Build #3604 - Engineering Case #301929)================ In rare circumstances, the backup copy of a transaction log created by the image-backup form of the BACKUP statement could have been corrupt. The bug does not apply to "archive backups" created by the BACKUP statement nor does it apply to the dbbackup command line utility. The problem which is now fixed, was more likely to show up on SMP machines and could only happen if operations were being performed while the log was being backed up. ================(Build #3605 - Engineering Case #301012)================ If a server was started on the same machine as another server of the same name, which was was in the process of shutting down, the server could have hung. Also, if a client attempted to connect via shared memory to the newly started server, while the previous server with the same name was still shutting down, the client could have hung. This problem has been fixed. ================(Build #3605 - Engineering Case #302812)================ In very rare situations, the server could have crashed while attempting to shutdown in response to a dbstop command with a connection string or when a client tried to disconnect normally. This is now fixed. ================(Build #4075 - Engineering Case #299117)================ A point of contention was present that could cause convoy phenomena to form. These phenomena could be detected by seeing that the CPU usage on a multi-CPU system dropped to about 1 CPU, while the number of active requests was high and the 'Contention: Engine' performance counter or EngineContention engine property was high.The convoys were most likely to form with requests that accessed a table through an index, with all of the indexed pages in cache. This point of contention has been removed. ================(Build #4076 - Engineering Case #296293)================ Under some rare conditions, queries with an ORDER BY clause, partially satisfied by an index, may have returned an unsorted result set. The conditions under which this may have happened were: - The query contains an ORDER BY clause of the form col1, col2, ...., expr1, expr2 - There exists an index IDX matching (col1, col2, ... ) (i.e., only a prefix of the ORDER BY clause is matched by an index) - There exists a WHERE equality predicate on at least one of the IDX columns - The best plan chooses the index IDX as an access method Example: SELECT T.Y, R.Z FROM T, R WHERE T.X = 1 AND R.Z = T.Z ORDER BY T.Y, R.Z where the table T has an index IDX on (T.X, T.Y ) This is now fixed. ================(Build #4076 - Engineering Case #296935)================ Passing a subquery expression as a procedure argument could have crashed the server. The subquery must have been part of another expression for the crash to have occurred; simple subquery arguments result in a syntax error. For example: call myproc(coalesce(null,(select 1))) A syntax error will now be generated for all subqueries used as any part of a procedure argument. To pass a subquery to a procedure, assign the subquery result to a variable and pass the variable to the procedure. ================(Build #4076 - Engineering Case #296999)================ When running with a database file that was created with Version 7.0 or before, and had not been upgraded to 8.0, then the query optimizer could have used selectivity estimates that were too low (as low as 0%) leading to inefficient execution plans. In cases where the plan was particularly poor, this could have appeared as an infinite loop. This is now fixed. ================(Build #4076 - Engineering Case #297566)================ A hash join with complex join conditions of the form: f( g( R.x ) ) = T.x could have caused the server to crash or give wrong results, if the value g( R.x ) was used above the join. For example, the following query caused the problem: select right( left( R1.z, 10 ), 1 ), 1 from R R1, R R2 where left( left( R1.z, 10 ), 6 ) = R2.z and (R1.x+1 > 0, 0 ) for read only This is now fixed. ================(Build #4076 - Engineering Case #297863)================ It was possible to define multiple consolidated users on the same remote database with a SQL command similar to : GRANT CONSOLIDATED TO u1,u2 TYPE FILE ADDRESS 'u1','u2'; This command now returns an error. ================(Build #4076 - Engineering Case #298000)================ If a Java stored procedure executed a query which referenced a proxy table, rows could have been omitted from the result set. A common appearance of the problem would have exhibited as missing every other row of a result from a proxy table. This is now fixed. ================(Build #4076 - Engineering Case #298285)================ In rare circumstances, indexes could be corrupted by internal server cursors. Internal server cursors are used by the server during the execution of many types of statement, usually to access system tables. This is now fixed. ================(Build #4076 - Engineering Case #298374)================ The server provides concurrency control for reading and updating the column statistics so that any changes to the statistics can take place safely in the presence of multiple simultaneous requests accessing the same statistics. The concurrency control method used could have caused the server to slow down unacceptably at very high rates of access (in one test the problem was observed after the number of concurrent users exceeded approximately 1500). The server now uses an improved concurrency control method and the problem should no longer occur. ================(Build #4076 - Engineering Case #298410)================ The following changes have been made: Added: property( 'LicensesInUse' )- determines the numbers of "seats" or "concurrent users" currently connected to the network server. Each "seat" or "concurrent user" is determined by the number of unique client network addresses connected to the server, not the number of connections. For example, if three client machines are connected to a server, and each client machine has two connections, select property( 'LicensesInUse' ) is '3'. Corrected: property('ProcessCPU') - now correctly returns the total process time in seconds. It was incorrectly returning two times the property('ProcessCPUUser') on Windows platforms. Corrected: db_property('IdleCheck'),db_property('IdleChkpt') and statistics "Idle Actives/sec" and "Idle Checkpoints/sec" - now return correct values (before they always had values of 0) ================(Build #4076 - Engineering Case #298511)================ Queries with views or derived tables in the null-supplying side of an outer join (left outer, right outer or full outer joins) may have returned an incorrect result set under these conditions: - there was a local predicate referencing only the view in the WHERE clause of the main query block and this predicate was not null-rejecting (for example, "View.column is null"). - the view or derived table could not have been flattened (e.g., it is a grouped view, or it contains an UNION) - the OUTER join could not have been transformed into an inner join Example: SELECT * FROM employee a LEFT OUTER JOIN ( SELECT * FROM employee UNION SELECT * FROM employee ) b ON (a.emp_id = b.emp_id) WHERE b.emp_id IS NULL This is now fixed. ================(Build #4076 - Engineering Case #298612)================ If a query contained a predicate that trivially evaluates to FALSE (e.g., c1 BETWEEN 5 and 10), the optimizer would have realized that the predicate would have caused the result set to be empty. However, in some cases (e.g., if a GroupByHash appeared in the plan above the filter), the server could still have caused memory to be allocated. Depending upon the estimated size of the result set without the predicate that evaluates to FALSE, enough memory could have been allocated that could result in the server running out of available memory. This problem has now been fixed. ================(Build #4076 - Engineering Case #299060)================ ASA now supports slightly larger standard cache sizes by allowing the cache to be allocated in up to 4 contiguous pieces where only two were allowed previously. Some DLLs load at addresses which fragment the address space and limit the amount of memory that can be allocated with only two pieces. With this change, perhaps 100MB to 200MB of additional memory may be allocated for a standard cache, depending on the system. For AWE caches, this change means that more address space will now be available for mapping to physical memory which will reduce the number of mapping operations which must be performed. Also with this change, the minimum AWE cache size has changed from (3GB-256MB) to 2MB. It is recommended, however, that a traditional cache be used if a traditional cache of the desired size can be allocated. Recall that AWE caches do not support dynamic cache sizing and that AWE cache page images are locked in memory and therefore they cannot be swapped out if memory is needed by other processes in the system. ================(Build #4076 - Engineering Case #299106)================ A point of contention existed which could have reduced concurrency on SMP machines, when using work tables (tables used for operations such as sort, group-by, and distinct). This situation could be recoqnized by observing CPU use on a mult-processor system at about 1 CPU, while the number of active requests was high, the HashContention property was high ('Contention: Hash Chains' performance counter), and many of the active requests were using work tables. The point of contention has been removed. ================(Build #4076 - Engineering Case #299110)================ In some circumstances, fetching backward on an index scan could have caused the index scan to fetch all rows prior to the current position, back to the beginning of the table. Even without backward fetches from the client, this situation could have arisen due to prefetching. This situation can be detected by higher-than expected running times combined with a larger than expected CacheReadIndLeaf property (the 'Cache Reads: Index Leaf' performance counter). ================(Build #4076 - Engineering Case #299119)================ Queries having DISTINCT and ORDER BY may have returned the incorrect order if the ORDER BY clause was satisfied by an index and DISTINCT was executed as a DistinctHash. Example: select DISTINCT T.y from T where T.x > 100 order by T.x If an index scan was used for the table T (the index on T.x) and DistinctHash was used, the result may not have been sorted. This is now fixed. ================(Build #4076 - Engineering Case #299361)================ During checkpoints, more writes might have been performed than necessary to write out table bitmaps. Unnecessary writes are no longer done. ================(Build #4076 - Engineering Case #299368)================ If the server was running in bulk mode (see the "-b" command line option) and a transaction caused a rollback, then in some rare situations it was possible for the database to become inconsistent as far as the catalog is concerned. This problem has now been corrected. As a consequence of this fix, the server will now employ the rollback log during the bulk mode and not use the transaction log as before. ================(Build #4076 - Engineering Case #299466)================ The network server now supports the LocalOnly TCP option (eg. -x tcpip(LocalOnly=YES), which restricts connections to the local machine. Connection attempts from remote machines will not find this server (regardless of connection parameters), and dblocate running on remote machines will not see this server. This parameter effectively turns the netwark server into a personal server, without the personal server limitations(i.e. no connection limit, no two CPU limit, etc.) ================(Build #4076 - Engineering Case #299721)================ The VALIDATE TABLE statement, or the dbvalid utility, could have spuriously reported missing index entries. When checking a foreign combined index, (ie 5.x format), with the FULL CHECK option, entries containing some, but not all, nulls would have generated a spurious report of a missing index entry. This is now fixed. ================(Build #4076 - Engineering Case #299936)================ A new property, QueryCachedPlans, has been added which shows how many query execution plans are currently cached. This property can be retrieved using the CONNECTION_PROPERTY function to show how many query execution plans are cached for a given connection, or DB_PROPERTY can be used to count the number of cached execution plans across all connections. This property can be used in combination with QueryCachePages, QueryOptimized, QueryBypassed, and QueryReused to help determine the best setting for the MAX_PLANS_CACHED option. ================(Build #4076 - Engineering Case #300402)================ Executing the system procedure, xp_startmail, would have returned either 0 (success) or 2 (failure), which maked diagnosing xp_starmail failures difficult. Now xp_startmail, (as well as xp_sendmail and xp_stopmail), returns one of the following: Value Description 0 Success 2 xp_startmail failed 3 xp_stopmail failed 5 xp_sendmail failed 11 Ambiguous recipients 12 Attachment not found 13 Disk full 14 Failure 15 Invalid session 16 Text too large 17 Too many files 18 Too many recipients 19 Unknown recipient 20 Login failure 21 Too many sessions 22 User abort 23 No MAPI 24 xp_startmail not called (xp_sendmail and xp_stopmail only) ================(Build #4077 - Engineering Case #299947)================ Expressions of the form '0-(expr)' could have given the wrong answer, namely '(expr)', where (expr) is any expression. For example: select 0-1; ---> gives 1 incorrectly select 0.0-1.0; ---> gives 1 incorrectly Now the correct answer is returned. ================(Build #4078 - Engineering Case #293788)================ Calling xp_sendmail functions simultaneously, from different connections, could have caused unexpected behaviour, up to and including a server crash. This has been fixed, but in order to take advantage of it, several system procedures need to change. Databases created, or rebuilt, after this change will have these new procedures, but for existing databases, the following script will make the necessary changes: -- START OF SCRIPT insert into dbo.EXCLUDEOBJECT values ( 'xp_real_stopmail' , 'P' ) go insert into dbo.EXCLUDEOBJECT values ( 'xp_real_startmail' , 'P' ) go insert into dbo.EXCLUDEOBJECT values ( 'xp_real_sendmail' , 'P' ) go CREATE function dbo.xp_real_startmail( in mail_user char(254) default null, in mail_password char(254) default null, in connection_id int ) returns int external name 'xp_startmail@dbextf.dll' go ALTER function dbo.xp_startmail( in mail_user char(254) default null, in mail_password char(254) default null ) returns int begin declare connection_id int; select connection_property( 'Number' ) into connection_id from dummy; return( xp_real_startmail( mail_user, mail_password, connection_id ) ) end go CREATE function dbo.xp_real_stopmail( in connection_id int ) returns int external name 'xp_stopmail@dbextf.dll' go ALTER function dbo.xp_stopmail() returns int begin declare connection_id int; select connection_property( 'Number' ) into connection_id from dummy; return( xp_real_stopmail( connection_id ) ) end go CREATE function dbo.xp_real_sendmail( in recipient char(254), in subject char(254) default null, in cc_recipient char(254) default null, in bcc_recipient char(254) default null, in query char(254) default null, in "message" char(254) default null, in attachname char(254) default null, in attach_result int default 0, in echo_error int default 1, in include_file char(254) default null, in no_column_header int default 0, in no_output int default 0, in width int default 80, in separator char(1) default '\t', in dbuser char(254) default 'guest', in dbname char(254) default 'master', in type char(254) default null, in include_query int default 0, in connection_id int ) returns int external name 'xp_sendmail@dbextf' go ALTER function dbo.xp_sendmail( in recipient char(254), in subject char(254) default null, in cc_recipient char(254) default null, in bcc_recipient char(254) default null, in query char(254) default null, in "message" char(254) default null, in attachname char(254) default null, in attach_result int default 0, in echo_error int default 1, in include_file char(254) default null, in no_column_header int default 0, in no_output int default 0, in width int default 80, in separator char(1) default '\t', in dbuser char(254) default 'guest', in dbname char(254) default 'master', in type char(254) default null, in include_query int default 0 ) returns int begin declare connection_id int; select connection_property( 'Number' ) into connection_id from dummy; return( xp_real_sendmail( recipient, subject, cc_recipient, bcc_recipient, query, "message", attachname, attach_result, echo_error, include_file, no_column_header, no_output, width, separator, dbuser, dbname, type, include_query, connection_id ) ); end -- END OF SCRIPT ================(Build #4078 - Engineering Case #300139)================ Under Windows 95, there was no response to a right-click on the server icon in the system tray. This has now been fixed. ================(Build #4079 - Engineering Case #300073)================ When using an external procedure or function written in Delphi, the server could have crashed with a floating point exception. The DLL would have enabled a number of floating point exceptions that are masked by default. While the proper fix would be to rewrite the external procedure or function, the server will now reset/restore the floating point control word at appropriate points. Code, such as the following, can be used to explicitly set the floating point control word: const MCW_EM = DWord($133f); begin Set8087CW(MCW_EM); end; ================(Build #4079 - Engineering Case #300192)================ When running the server on NetWare 4.x, it required that TCPIP.NLM be already loaded on the NetWare server. This requirement has been removed, it is now loaded dynamically. ================(Build #4079 - Engineering Case #300203)================ Using Syntax 2 of the FORWARD TO statement could have caused the local ASA server to crash. An example is as follows: forward to SOME_REMOTE_SERVER; select * from systable; ===> CRASH Whereas the following: forward to SOME_REMOTE_SERVER {select * from systable} was not a problem. This has now been fixed. ================(Build #4079 - Engineering Case #301567)================ The event_parameter function can now be used to determine the name of the schedule which caused an event to be fired. The value of: event_parameter('ScheduleName') will be the name of the schedule which fired the event. If the event was fired manually using TRIGGER EVENT or as a system event, the result will be an empty string. If the schedule was not assigned a name explicitly when it was created, its name will be the name of the event. ================(Build #4080 - Engineering Case #297828)================ A point of contention existed which could have reduced concurrency on SMP machines, when using outer joins that supplied NULL rows. This situation could be recoqnized by observing CPU use on a mult-processor system at about 1 CPU, while the number of active requests was high, and many of the active requests were using outer joins that supply NULL rows. The point of contention has now been removed. ================(Build #4080 - Engineering Case #299102)================ The table sys.dummy was previously implemented as a real table. As the single row was fetched from this table, the corresponding table page was temporarily latched while reading the column out (as is done for all base tables). Since the dummy table contains only one row, there was a strong possibility that multiple clients would be concurrently attempting to latch the same page. This could lead to reduced opportunities for parallelism, and in some cases could lead to the formation of convoys. These symptoms could be observed by noting that the CPU use on a multi-processor system dropped to about one processor, while many requests were active or unscheduled; at the same time, many of the active requests referenced the sys.dummy table. To address this issue, the sys.dummy table is now implemented in a manner that bypasses the latch on the table page. This is only possible because the dummy table has known contents which can not be modified. Further, the sys.dummy table no longer appears in Lock nodes in the graphical plan, and if only the sys.dummy table is present, a Lock node may now be omitted where it was previously required. ================(Build #4080 - Engineering Case #299109)================ Search conditions of the form "col LIKE '<prefix>%' " can usually use an index (ie sargable), if the prefix does not contain any wild card characters. For these conditions, the engine infers range bounds of the form "col >= '<prefix>' AND col < '<prefix#>'", where <prefix#> indicates a version of the prefix string that has been incremented. For example, if the following appears in a query: emp_lname like 'SI%' then the optimizer will add additional predicates: emp_lname >= 'SI' AND emp_lname < 'SJ' Note that the last character, 'I', has been incremented to the next character in the collation; in this case, 'J'. For prefix strings that consisted only of the last character of the collation sequence (for example, 'Z'), the server did not form the incremented prefix, did not form the upper bound for the column and the lower bound was not included. Because of this, an index would not be used for the column. Now, for conditions of the form: emp_lname like 'ZZ%' the lower bound will be added by the optimizer as follows: emp_lname >= 'ZZ'. An index will be selected for this column, if it would have been used for the added range predicate. Note that conditions such as "emp_lname LIKE 'SZ%'" are treated by adding: emp_lname >= 'SZ' AND emp_lname < 'T' and can use an index before and after this change. ================(Build #4080 - Engineering Case #299120)================ Simple queries such as the following: SELECT * FROM T WHERE T.x = ? would not have used an index on T.x, if the value of the host variable was NULL. In order for this issue to appear, the query must have been sufficiently simple to bypass optimization. For example, it must have contained only one table with no aggregates nor disjuncts. The predicate T.x = ? will match no rows if the host variable is NULL. While no rows were returned before this change, a complete sequential scan of the table was performed. This scan is not longer done. Further, the graphical plan would not have shown the sequential scan in this case, as the graphical plan does not use the optimizer bypass. ================(Build #4080 - Engineering Case #300483)================ Under some circumstances, the statistics gathering in the server during query execution could have caused a divide by zero floating point exeception. Usually, these exceptions do not cause any significant problems. The problem has been fixed. ================(Build #4082 - Engineering Case #300796)================ The server automatically generates histograms on columns being loaded via the LOAD TABLE statement. The size of a histogram that was being generated during LOAD TABLE was unnecessarily large. Now LOAD TABLE will generate histograms with the same sizes as the equivalent histograms created by the CREATE STATISTICS statement. ================(Build #4082 - Engineering Case #300847)================ If the path to a database file contained brace characters (eg. "E:\test\{test}\sample.db"), applications using dblib or odbc could not have autostarted it. This has been fixed. Note that starting a server directly on the file (eg. dbeng8 E:\test\{test}\sample.db) was not a problem. ================(Build #4082 - Engineering Case #301414)================ The START DATABASE statement now allows a database to be started in read-only mode or with log truncation on checkpoint enabled. New syntax: STARTÿDATABASEÿdatabase-file [ÿASÿdatabase-nameÿ] [ÿONÿengine-nameÿ] [ÿAUTOSTOPÿ{ÿONÿ|ÿOFFÿ}ÿ] [ WITH TRUNCATE AT CHECKPOINT ] [ FOR READ ONLY ] [ÿKEYÿkeyÿ] ================(Build #4083 - Engineering Case #300584)================ An assertion failure could have been generated when using an aggregate function in a GROUP BY clause. For example, the following query could have caused the assertion failure: 102300 (8.0.1.3067) File associated with given page id is invalid or not open select DT.TID from sys.syscolumn C, ( select T.table_name, max( table_id ) TID from sys.systable T group by T.table_name ) DT where C.column_name = DT.table_name group by DT.TID In order for the problem to have occurred, an intervening work table must have appeared between the first GROUP BY clause and the second. THis has now been fixed. ================(Build #4083 - Engineering Case #301242)================ Using 'LOAD TABLE' to load data into a table could have caused some data to 'disappear'. For example, after loading 5000 rows of data into an empty table the statement 'select count(*) from table' could return a value less than 5000. Also, selecting all of the rows could return some subset of the rows that were loaded. All of the following would need to be true to experience this problem: 1) The table into which the data was loaded was empty 2) The table into which the data was loaded contained more than one database page 3) The resulting table after the 'LOAD TABLE' statement contained at least 100 database pages Databases experiencing this problem should be rebuilt. Unload the database using DBUNLOAD and make sure to unload the data 'ordered'. CAUTION: If you do an 'unordered' unload of the database the missing rows will be permanently lost. ================(Build #4083 - Engineering Case #301342)================ Validating the database may have changed the rowcount (column "count") value in SYSTABLE. The first validation would have given the error 'Run time SQL error -- row count in SYSTABLE incorrect'. Validating the database a second time would have returned no error. The rowcount value in SYSTABLE is now no longer updated when validating the database. ================(Build #4084 - Engineering Case #301419)================ An INSERT WITH AUTO NAME embedded within a stored procedure would have failed, usually with SQLCODE -207. For example: CREATE TABLE T ( PKEY INTEGER NOT NULL DEFAULT AUTOINCREMENT, DATA1 INTEGER NOT NULL, PRIMARY KEY ( PKEY ) ); CREATE PROCEDURE P() BEGIN INSERT T WITH AUTO NAME SELECT 1 AS DATA1; END; CALL P(); -- ASA Error -207: Wrong number of values for INSERT Using WITH AUTO NAME on an INSERT statement on its own (outside of a procedure context) would work have worked correctly. This is now fixed. ================(Build #4085 - Engineering Case #301110)================ A stored procedure cursor declared using the form: DECLARE CURSOR c USING variable-name could have caused an error or returned incorrect results. The problem would have occurred after the procedure had been called more than 11 times. While this is now fixed, a workaround is to set the value of the Max_plans_cached option to 0. ================(Build #4085 - Engineering Case #301575)================ When there were approximately one hundred idle connections with liveness enabled, liveness packets would have been sent out in large bursts. These bursts could potentially have caused performance problems or dropped connections. This fix attempts to avoid sending liveness packets in large bursts. ================(Build #4085 - Engineering Case #301603)================ The sa_validate stored procedure would return errors containing garbage values. This has been fixed. ================(Build #4086 - Engineering Case #297833)================ If a computed column referenced another column in the table, then the computed column could havw been updated incorrectly to NULL or based on an old value of the referenced column if the update or insert statement had a subquery with an outer reference to a column of the table being updated. For example, the following update would have caused the issue: create table compute_test ( id char(10), name char(40), compute_name char(40) compute(name) ); insert into compute_test(id,name) select 'dba', 'test2' from compute_test T where 0 = ( select count(*) from sys.dummy where T.id=current publisher ); In addition to having the subquery appear explicitly in the update or insert statement, the problem could also have occurred if a publication referenced a column of the table. This has now been fixed. ================(Build #4086 - Engineering Case #298372)================ The server would have crashed on shutdown, when running on Windows CE .NET. This is now fixed. ================(Build #4086 - Engineering Case #301923)================ If a personal server was running, and a network server was also running on another machine with the same name, and there is an entry in the asasrv.ini file for the remote server, dbisql would have connected to the remote server even without having specifying an engine name or links. This could have happened on any dblib / odbc connection that specified LocalOnly=YES. This has been fixed. ================(Build #4087 - Engineering Case #299297)================ The database server could have reported a fatal error or assertion failure due to a failed IO operation. The error message displayed may have been "Fatal error: Unknown device error", "Fatal error: no error", "A write failed with error code: (1453)", "A write failed with error code: (1450)", or some other form of fatal error or assertion failure message. Certain errors such as 1450 and 1453 can (apparently) be reported by NT during "normal" operation. The server now retries IOs that fail with one of these particular error codes up to 100 times. If the IO does not succeed after 100 attempts, the server will now report the error as a fatal error (same message as before). It is impossible to know whether 100 attempts will give the OS sufficient time to remedy whatever problems it is having. It is believed that the OS reports these errors when available memory is low. A work around may be to ensure that the system is not low on memory. ================(Build #4087 - Engineering Case #299615)================ The following sequence of statements would have resulted in a server crash: create table table1 (col1 int, col2 int, col3 int ); create view v1 as select col1, col2, col3 from table1; alter view v1 (col1) as select col1, col2, col3 from table1; The ALTER VIEW statement included a column list for the view which did not match the SELECT list. An error is now reported. ================(Build #4087 - Engineering Case #301968)================ A query with a merge join, meeting the following conditions, may have returned too few rows: 1 - The join condition was an equality predicate, (call this predicate P1). 2 - There was a non-equality predicate referring to columns from both tables, (call this predicate P2). 3 - At least one row from the left hand table, joined to multiple rows from the right hand table. 4 - P2 rejected at least one row that would be in the result, if P1 was the only predicate in the query. 4) Merge join is chosen by the optimizer. This has been corrected. ================(Build #4088 - Engineering Case #299223)================ A valid query containing a CASE expression in both the SELECT list and the GROUP BY clause, may have failed with SQLCODE -149. For this to have occurred, the CASE expression must omit the final ELSE clause. A simple reproducible is SELECT CASE dummy_col WHEN 0 THEN 'Q1' WHEN 1 THEN 'Q2' END from dummy GROUP BY CASE dummy_col WHEN 0 THEN 'Q1' WHEN 1 THEN 'Q2' END; This has been corrected. ================(Build #4088 - Engineering Case #302305)================ Performance improvements were done for several internal functions used by the optimizer. These changes may reduce the OPEN time for very complex queries. ================(Build #4088 - Engineering Case #302314)================ For statements used in the procedures, plans may be cached after a training period (i.e., after a procedure has been called a few times). For statements for which it is anticipated that the plans will not change too often, the training period is now shorter, hence, the plans are saved much sooner than before. Statements in this category include UPDATE/DELETE/SELECT statements on one table with a WHERE equality predicate on the primary key. ================(Build #4088 - Engineering Case #302330)================ Selecting property('TempDir') when connected to a NetWare server would have returned a random string on 8.0.1, or "SYS:" on 8.0.2 and up. On NetWare, temp files for a database are located in the same directory as the database, so the value of this property is meaningless. It has now been changed to return an empty string. ================(Build #4088 - Engineering Case #302410)================ Batch statements executed outside procedures, triggered the deletion of all cached plans. For example, when the following script was executed, the plans saved during the execution of the procedures 'proc1' and 'proc2' were all deleted after the message statement, (the MESSAGE statement is considered a batch). Now, only batch statements that change the plan cache, triggers the deletion of cache. In the example below, the cache plan is left unchanged after the message statement. EXEC proc1; EXEC proc2; Message 'some message'; ================(Build #4090 - Engineering Case #302457)================ If a query contained an IN predicate on a table which had an ORDER BY clause on another column, the rows could have been returned in an order that did not match the ORDER BY clause. For the rows to be mis-ordered, the following conditions must hold: - An index is selected on the table to satisfy the IN predicate - The IN predicate appears in the index before the column in the ORDER BY For example, the following query could exhibit the problem if an index on T(a,b) was selected: SELECT * FROM T WHERE T.a IN (1,2) AND T.b>3 ORDER BY T.b This is now fixed. ================(Build #4090 - Engineering Case #302635)================ It was possible for an INSERT statement, using the ON EXISTING UPDATE clause, to silently fail if the row it was attempting to modify was locked. This is now fixed. ================(Build #4090 - Engineering Case #302757)================ If a procedure, trigger, view or event handler was created with a trailing semi-colon, the preserved format of the object definition would have included the semi-colon as well. This would have resulted in an error if the database was later rebuilt. The semi-colon is now removed when the object is created. A workaround is to recreate the affected objects without the trailing semi-colon. The following queries can be used to find affected objects: select * from SYS.SYSTABLE where substr(source,length(source),1) = ';' select * from SYS.SYSPROCEDURE where substr(source,length(source),1) = ';' select * from SYS.SYSTRIGGER where substr(source,length(source),1) = ';' select * from SYS.SYSEVENT where substr(source,length(source),1) = ';' ================(Build #4091 - Engineering Case #293306)================ The server will no longer attempt to update statistics during recovery and when executing "simple" DELETE and UPDATE statements. Simple statements are those that are not optimized and are executed directly by the server. ================(Build #4092 - Engineering Case #298906)================ Calling a Java in the Database object which created a zip file using 'java.util.zip.ZipOutputStream', with either JDK 1.1.8 or 1.3, would have reported a bad CRC error. This has now been fixed. ================(Build #4092 - Engineering Case #302216)================ The error message "The system DLL kernel32.dll was relocated in memory. The application will not run properly. The relocation occurred because the DLL c:\program files\sybase\SQL Anywhere 8\win32\dbserv8.dll occupied an address range reserved for windows NT system DLLs. The vendor supplying the DLL should be contacted for a new DLL.", could have been displayed when attempting to start the server. This has been fixed. This error message only seemed to occur after applying a specific Microsoft Hotfix (Q299444). ================(Build #4092 - Engineering Case #302905)================ The server would have crashed if a null expression was passed into a string parameter when calling an internal stored procedure. This is now fixed. ================(Build #4092 - Engineering Case #303048)================ A FOR statement in a stored procedure would have created string variables for date, time or timestamp expressions in the SELECT list of the FOR query, if the Return_date_time_as_string option was ON. Now, the variables are created with the same data types as the expressions. ================(Build #4093 - Engineering Case #303294)================ The server collects statistics on predicate selectivities during query execution and updates the existing column statistics accordingly. The server was missing some opportunities of lowering incorrect statistics when doing multi-column index scans. This problem has now been fixed. ================(Build #4093 - Engineering Case #303389)================ When looking up the selectivity estimates for a predicate on values currently out of range of the column histogram, the server could have used an inappropriate values, such as 0%. Now, the server handles these cases of selectivity look-ups and subsequent updates more appropriately. ================(Build #4093 - Engineering Case #303457)================ If a procedure, trigger, view or event handler contained a right brace character, the original source format for the object was not saved. The object would still have been created correctly and would function properly, but its appearance would be altered when viewed from Sybase Central. This has been fixed. A workaround is to remove the right brace character, if it appears only in a comment, or replace it with \x7d or CHAR(0x7d) if it appears within a string. ================(Build #4094 - Engineering Case #303563)================ If the SUBSTR function was used to obtain a substring of a LONG VARCHAR column and the third argument was not provided, a value of 32767 was used. The function worked correctly if the first argument was a variable. Now a value of 2147483647 is used. For expressions such as variables, where the string length is known when the expression is built, the actual string length will continue to be used as the third argument. ================(Build #4094 - Engineering Case #303602)================ When attempting a BACKUP DATABASE operation on Windows CE, the process would have failed with the error message: IO Error 5 doing 'fstat' on file '<backup file name>'. Ensure that all PC cards are inserted and that storage space is available. Retry/Cancel. This has been corrected. ================(Build #4095 - Engineering Case #298849)================ The server now allows one extra connection above the connection limit, to allow a user with dba privileges to connect and drop other connections, in case of an intentional or accidental denial-of-service attack. Note that "connection limit" here refers to either the hard-coded 10-connection limit of the personal server, or the value specified by the -gm switch, and has nothing to do with licensing. ================(Build #4095 - Engineering Case #304034)================ Inserting into a proxy table would have caused a server crash, if the INSERT statement used the ON EXISTING UPDATE clause. The ON EXISTING UPDATE clause is not supported when inserting into proxy tables and will now cause a syntax error. ================(Build #4096 - Engineering Case #304151)================ Executing an ALTER EVENT statement, to delete an event handler, was not setting the "source" column in the SYSEVENT table to NULL. This is now fixed. ================(Build #4098 - Engineering Case #303370)================ An assertion failure such as: 102300: File associated with given page id is invalid or not open. could have occurred when processing a query that skipped a string column that appeared on a continuation page. A continuation page is used for a row when a row does not fit entirely on one page. For example, this can occur if a column is added to an existing table. ================(Build #4098 - Engineering Case #304250)================ The STUFF function did not work properly on strings containing multibyte characters. It now handles MBCS strings correctly. ================(Build #4098 - Engineering Case #304604)================ Queries containing FULL OUTER JOINs and at least five (5) quantifiers may have suffered from a poor access plan. In particular, in such cases the ASA optimizer would only have considered nested-loop full outer join (JNLFO) for each FULL OUTER JOIN in the query. This problem has been corrected. ================(Build #4099 - Engineering Case #300425)================ In order to make cost based decisions on which indexes to use, the optimizer needs to know some physical properties or statistics of the various candidate indexes. These statistics include the number of leaf pages in and the depth of an index. The server was obtaining the approximate index statistics by performing run time sampling of indexes which could have been an expensive operation, especially when optimizing small queries with a large number of potential indexes to choose from. The server will now maintain the required statistics as each index is updated. Not only will the statistics now be available to the optimizer at virtually no cost, the statistics will also be accurate. The new statistics will persist in SYSATTRIBUTE in the form of one row for each statistics for an index. The rows in SYSATTRIBUTE will only be created when required, e.g., a row for index depth will be created only when the index depth increases to 2. The statistics will be maintained for all indexes including those on catalog tables. Also, the VALIDATE statement will now verify that the statistics on the specified index(es) are accurate and will generate an error otherwise. ================(Build #4108 - Engineering Case #303576)================ The MobiLink server memory usage would have increased over time as synchronizations occurred, even if the synchronization did no processing. This has been corrected. ================(Build #4108 - Engineering Case #305678)================ A request to a remote server, that is taking a long time, can now be cancelled provided the remote class is ODBC based. If the cancellation is successful, control will be returned to the client with an appropriate error message; if on the other hand the request can not be cancelled, then the engine will continue to wait until the request completes. ================(Build #4111 - Engineering Case #306021)================ An isolation level 3 scan could have returned null values unexpectedly. This is now fixed. ================(Build #4114 - Engineering Case #306125)================ With ANSI_INTEGER_OVERFLOW set to 'on', select 470488670*16 would have returned -1062115872 on Unix platforms. This has been corrected so that the behaviour is to return an overflow error. ================(Build #4118 - Engineering Case #303401)================ An server crash could have occurred if the following conditions were true: - optimization logging was enabled - the option LOG_DETAILED_PLANS was set to ON - the query being logged was a complex statement - the optimization strategy for the query was *not* being logged through the use of one of the PLAN() functions. This is now fixed. ================(Build #4119 - Engineering Case #305412)================ If a blob column was updated using oledb (eg. through ADO cursors ), the ASA provider could have crashed. This is now fixed. ================(Build #4123 - Engineering Case #306536)================ If a query contained a grouped subquery in the HAVING clause, and the grouped subquery referenced an aggregate function from the main query, then an incorrect result set may have been returned. This is now fixed. The example below illustrates this issue: the subquery is a grouped query and the aggregate function "min(p.quantity)" is an aggregation that must be computed in the main query block: select id from product p where quantity < 28 group by id having ( select COUNT(*) from product p1 where 28 >= min(p.quantity) ) > 0 ================(Build #4126 - Engineering Case #310658)================ If a database server was started as an NT service, using the LocalSystem account, non-administrative users would still have been able to kill the database server process using the task manager or a command-line based kill program. With this fix, non-administrative users no longer have the ability to kill the database server process. ================(Build #4126 - Engineering Case #310709)================ Queries containing ANY or ALL subqueries may have returned errors (such as SQLE_CANNOT_OPTIMZE_QUERY). if the ANY/ALL subquery contained aliases on subselects. For example: select (select count(*) from R) as A from T where 1 <> ALL (select A from S ) This has now been corrected. ================(Build #4127 - Engineering Case #311274)================ When using database with a Japanese collation, characters with a second byte of \x7d, would have caused a syntax error (ASA error -131) if they appearred in object names in CREATE PROCEDURE/FUNCTION/TRIGGER statements. This problem has been fixed. ================(Build #4200 - Engineering Case #304918)================ Attempting to call a Java method immediately after upgrading a database to add Java support, caused a misleading error message "not a public Java class." The documentation of the ALTER command states "If you add Java in the database, you must restart the database before it can be used." BUT this could be missed while working through the "Invoice sample." The message has been changed to now say "The database needs to be restarted for this Java related command." ================(Build #4201 - Engineering Case #304960)================ When making a connection to an ASA remote server, via ODBC, the Remote Data Access layer now names the remote connection ASACIS_? where "?" gets replaced with the connection id of the local connection. This feature is useful if a customer needs to drop the remote connection in order to cancel a remote request. ================(Build #4201 - Engineering Case #304975)================ When attempting to create a proxy table to a MS SQL Server table that had a uniqueidentifier column, the Remote Data Access layer would fail with an unsupported datatype error. As of this change, the proxy table now successfully gets created with the uniqueidentifier column being mapped to a local column with a user-defined data type of uniqueidentifierstr, who's base thpe is char(36). Hence querying the uniqueidentifierstr column will force the SQL Server ODBC driver to convert the uniqueidentifier column to a string. Users can then use strtouuid to map the uniqueidentifiersrt to a uniqueidentifier. The sa_migrate scripts have also been modified such that migrating a SQL Server table with a uniqueidentifier column will result in creating a base table that also has a uniqueidentifier column. The migrate scripts will handle converting the uniqueidentifiersrt to a uniqueidentifier prior to inserting the value into the base table. ================(Build #4202 - Engineering Case #303278)================ An INSERT ... SELECT statement, which contained a UNION involving a non-existent user-defined function, would have caused a server crash when executed. This problem has now been fixed and a "procedure not found" error message will now be returned. ================(Build #4203 - Engineering Case #305313)================ The database server could report a "Fatal error: database error" when a sequential scan was being performed on a temporary table using group reads (which requires a database initialized with 8.0.0 or later and the table must be 'large'). The problem would have occurred very infrequently and would only have occurred if the temporary table pages were located near the end of the temporary file. This problem has now been fixed. ================(Build #4204 - Engineering Case #300081)================ Executing a CREATE SERVER statement with an unsupported class on NetWare would have succeeded, but executing a CREATE EXISTING TABLE on that server would have caused the NetWare server to abend. This has now been fixed. Note that 'asajdbc' is the only supported class on NetWare. ================(Build #4204 - Engineering Case #305902)================ It was possible that any of the following commands could have written the OPTION clause incorrectly to the database: CREATE SYNCHRONIZATION USER, ALTER SYNCHRONIZATION USER, CREATE SYNCHRONIZATION SUBSCRIPTION, ALTER SYNCHRONIZATION SUBSCRIPTION, CREATE SYNCHRONIZATION SITE, ALTER SYNCHRONIZATION SITE, CREATE SYNCHRONIZATION DEFINITION, ALTER SYNCHRONIZATION DEFINITION, CREATE SYNCHRONIZATION TEMPLATE, ALTER SYNCHRONIZATION TEMPLATE. This has now been fixed. ================(Build #4206 - Engineering Case #302606)================ Support for the Borland compiler was missing in 8.0.x releases. In particular: - compiling dbtools.h failed - the dbtools and dblib import libraries (dbtlstb.lib and dblibtb.lib) were missing - samples\asa\c\makeall.bat failed to build using the Borland compiler. This has been fixed. Note that due to a limitation of newer Borland linkers, Borland compiler built Embedded SQL applications must now compile and link src\sqlcadat.c (in the Adaptive Server Anywhere install directory) into each Embedded SQL application. This is in addition to linking against dblibtb.lib. ================(Build #4206 - Engineering Case #305913)================ If the following procedure was created using Sybase Central, a syntax error would result when trying to rebuild the database: create procedure mytest() as select 1 go Note that the procedure ends with a SELECT statement having no FROM clause. The server treats the "go" as an alias for the last SELECT list item; otherwise, a syntax error would be given when trying to save the procedure definition in Sybase Central. The "go" is included in the preserved-source string and causes a syntax error on rebuild.This problem is similar to issue 302757. The trailing "go" is now removed when saving the procedure definition. . ================(Build #4208 - Engineering Case #303630)================ On Windows platforms other than CE, if no environment variable was set to define the location for ASA temporary files, a database could not have been started. The temporary file will now be created in the directory where the server was started. ================(Build #4208 - Engineering Case #306763)================ If the TCPIP parameter MyIP, was not a valid IP address, (or the keyword NONE), (i.e. "-x tcpip(MyIP=mypcname)"), a value of 255.255.255.255 was used instead. This has been fixed, only IP addresses (in standard "dot notation") or the word "none" are allowed. Anything else will give an error on startup. ================(Build #4208 - Engineering Case #306988)================ Starting a server with both the -x tcpip(DoBroadcast=NO) and -sb 0 switches would have caused it to crash. This has been fixed. ================(Build #4209 - Engineering Case #303384)================ If a remote table A had two separate foreign key columns c1 and c2, both referencing table B. the sa_migrate system procedure would have attempted to import both foreign keys as a single foreign key relationship; ie (c1, c2) references B(p1,p1), resulting in the error "foreign key p1 already referenced". This problem has now been fixed. ================(Build #4209 - Engineering Case #303402)================ The sa_migrate system procedure would have migrated indexes incorrectly. For example, given a table T with columns c1,c2,c3,c4,c5 with index i1 on column c1, and index i2 on columns c2 and c5. The generated indexes for the local table would have had two separate but identical indexes, i1 on columns c1,c2 and c5 and i2 on columns c1,c2 and c5. This problem has now been corrected. ================(Build #4209 - Engineering Case #306324)================ Attempting to create an event with a "WAIT AFTER END" clause would have crashed the server. For example: create event MyEvent schedule MySchedule start time '10:00PM' on ('Thu','Fri') handler begin backup database directory 'd:\\backup' wait after end transaction log truncate end This has now been fixed. ================(Build #4209 - Engineering Case #306963)================ A query in which an ORDER BY DESC was satisfied with a trie-based index could have returned no rows, instead of the intended results. This could also have happened with an ORDER BY ASC, if it was satisfied with a descending index. This has now been fixed. ================(Build #4209 - Engineering Case #307143)================ If a view or derived table was defined with a constant column and the constant column was equated with another constant in a query, the server may have crashed. This has been fixed. The example below illustrates this case, the column X is defined to be 0 in the derived table DT definition and it is equated with the constant 2 in the predicate "DT.X = 2": create table #temp1 (X int); insert into #temp1 select * from ( select X=0 from product p1, product p2 where p1.id = p2.quantity ) AS DT(X) where DT.X = 2 ; ================(Build #4209 - Engineering Case #307157)================ If a join predicate is of the form "L.X = R.X" where L.X is a unique column, and R.X is not a foreign key column, then the estimated selectivity for the predicate "L.X = R.X" is now computed based on the number of distinct values of the column R.X. For this estimates to be close to the real selectivity, R.X must have an up-to-date histogram or an index on <R.X> must exist. Note, for an index to be useful, the database must have been created with an 8.0 2 or later server. ================(Build #4209 - Engineering Case #307415)================ When using the Remote Data Access feature to attempt to create a proxy table to a Microsoft Access database, the server may have failed with a "table not found message". This problem occurred when the file path of the Access database was longer than 63 characters. The problem has now been fixed. ================(Build #4211 - Engineering Case #308011)================ The server could have crashed after warning of a fatal error, (most likely due to an out of disk condition). This has been fixed. ================(Build #4212 - Engineering Case #306063)================ Inserting a row could have caused assertion 200601. This would only occur when doing an insert using the 'ON EXISTING UPDATE' clause. The row being inserted must not have been in the table (ie. no update happened). The table to which the row was being inserted also needed to have been involved in replication for the assertion to occur. The resulting database file was not corrupt. This has been fixed. ================(Build #4212 - Engineering Case #306467)================ Calling sa_get_eng_properties on a operating system platform with a large amount of memory, would have displayed properties like "MainHeapBytes" as a negative number. This can also be demonstrated by calling the property() function directly. Example: select property( 'MainHeapBytes' ); This has been fixed. ================(Build #4212 - Engineering Case #306580)================ Queries with LIKE predicates containing a NULL escape character were being evaluated as if there was no escape character. Now LIKE predicates containing a NULL escape character evaluate to NULL. This new behaviour matches the ANSI standard. ================(Build #4212 - Engineering Case #308297)================ If a forward-only, read-only cursor was opened with a query that was optimized to use a merge join, then the error: -187 "Illegal cursor operation attempt" 09W02 could have been returned. For example, this error would be returned when re-fetching the current row. This has now been fixed. ================(Build #4212 - Engineering Case #308323)================ If a SQL stored procedure was defined as an external java procedure and the access modifier for the java method was private, calling the stored procedure would have executed the method instead of giving an error. Now, the server will report a PROCEDURE_NOT_FOUND error when such procedure is called. ================(Build #4212 - Engineering Case #308330)================ Attempting to connect, using jConnect, to a UTF8 database using a userid which contained non-ASCII characters, would have failed. This has now been fixed. ================(Build #4212 - Engineering Case #308440)================ Running 'TRUNCATE TABLE' on an already corrupted table could have resulted in other database objects also becoming corrupted and would only have happened in extrememly rare circumstances. 'VALIDATE TABLE' would have found the corruption both before and after the 'TRUNCATE TABLE' command. Assertion 200607 has now been added to catch this case. ================(Build #4213 - Engineering Case #308632)================ Adaptive Server Anywhere allows one index on a table to be specified as clustered. This specification can now be changed via the ALTER INDEX statement without the need to recreate the index. Note that this statement only changes the specification of the index but does not reorganize the data. So, if the clustered index on a table is changed, then depending upon the key composition for the old and the new clustered index, the data may no longer be clustered on the new clustered index. Remember that the clustering of an index in ASA is only a hint to the server and the clustering of data is not guaranteed. However, if so desired, clustering can be restored by using the REORGANIZE TABLE statement. ================(Build #4214 - Engineering Case #295384)================ Indexes and foreign keys explicitly created by a user can now be renamed with an ALTER INDEX statement: ALTER INDEX indexname rename-spec ALTER [INDEX] FOREIGN KEY rolename rename-spec rename-spec: ON [ owner.]tablename RENAME [ AS | TO ] newname ================(Build #4214 - Engineering Case #308663)================ If the option wait_for_commit was on, it was possible to commit a transaction that had inserted a foreign key with no matching primary key. For this to have happened, all of the following conditions must hold: - the foreign key in question must have been larger than any existing primary key, - another transaction (also with the wait_for_commit option on) must have inserted the same foreign key before the first transaction commited, and must have done so while the foreign key was greater than any existing primary key, - between the two foreign key insertions, enough primary keys must have been added to fill the last leaf page and at least one of these keys must be subsequently deleted (before the second foreign key insertion). - the index used to enforce the constraint must have been a uncombined (split) comparision-based index. This has now been fixed. ================(Build #4214 - Engineering Case #308770)================ If the length of the view's name in a CREATE VIEW statement exceeded 119 bytes, the server would have crashed. Now names of up to 128 bytes are allowed. If the size of the name is over 128 bytes, the error 'Identifier ... too long' will be reported. ================(Build #4214 - Engineering Case #308844)================ The dbtsinfo utility would have always displayed NULL for a database property called PatriciaTrees. This property had been replaced by one called CompressedBTrees, but dbtsinfo continued to refer to the old name. This is now fixed. ================(Build #4214 - Engineering Case #309015)================ When an event is executed, it runs on its own connection. If an event connection was dropped (either from Sybase Central or using the DROP CONNECTION statement), the server would have crashed, if it had been started with the -z switch. This has now been fixed. ================(Build #4215 - Engineering Case #309296)================ In the presence of concurrent DDL or LOCK TABLE operations, it was possible to commit a transaction that had inserted a foreign key with no matching primary key. For this to have occurred, all of the following conditions must have been true: - the committing transaction must have deleted a primary row for which there were foreign references - another transaction must have had the foreign table's schema locked exclusively (via DDL or LOCK TABLE) - the DDL or LOCK TABLE operation must have been the first use of the foreign table since it was loaded - the committing transaction must have had blocking off (or possibly be involved in a deadlock) - the index used to enforce the constraint must have been an uncombined (split) index. This problem, which could also have resulted in a server crash, is now fixed. ================(Build #4215 - Engineering Case #315471)================ A new built-in function has been added with the following syntax: DB_EXTENDED_PROPERTY ( { property_id | property_name }, [, property-specific_argument [, { database_id | database_name } ] ] ) This new function, db_extended_property(), is similar to db_property(), but it allows an optional property-specific string parameter to be specified. The interpretation of the property-specific argument depends on the property id or name specified in the first argument. Calling db_extended_property( x ) is equivalent to calling db_property( x ). Two new properties have been added: FileSize and FreePages. Each of these properties can take an optional argument which specifies the dbspace for which the property is being requested. The dbspace can be specified as any of the following: - the name of the dbspace - the file_id of the dbspace - 'translog' to refer to the transaction log file - 'temp' to refer to the temp file - 'writefile' to refer to the write file If the dbspace does not exist, the property function will return null. If the name of a dbspace is specified and an id or name of a database which is not the database of the current connection is also specified, the function will also return null (since it is not possible to query the system tables across databases) except that the well-known name 'system' will still be accepted. FileSize returns the length of the specified database file in pages. For the system dbspace on databases created with 8.0.0 or later, FileSize includes the size of the checkpoint log which is located at the end of the database file. FreePages returns the number of free pages in the specified file. FreePages is only supported on databases created with 8.0.0 or later. For the transaction log, FreePages returns the number of completely empty, unused pages between the current logical end of the log and the physical end of the log file. When using a write file, FreePages on a dbspace will return the number of free pages in the virtual dbspace represented by writefile. FreePages on the writefile itself returns the number of pages free in the writefile that can be used to create new mapped versions of database pages. That is, pages may appear free to a dbspace but, from the point of view of the write file itself, they are actually allocated and in use inside the write file as images of pages. If no property-specific argument is provided for either of these properties, the system dbspace is assumed. ================(Build #4216 - Engineering Case #308855)================ When connecting to an authenticated ASA remote server using Remote Data Access, the connection would not have been auto-authenticated. As a result, the connection would become read only after the 30 second time out. This problem has now been resolved and all connections to ASA remotes are now auto-authenticated. Note that the Remote Data Access class must be either asaodbc or asajdbc. ================(Build #4216 - Engineering Case #308965)================ A new option, OPTIMISTIC_WAIT_FOR_COMMIT, has been added to aid in migrating 5.x applications to 8.x. By default, OPTIMISTIC_WAIT_FOR_COMMIT is 'off', when it is set to 'on' locking behaviour when WAIT_FOR_COMMIT='on' is changed as follows: - no locks are placed on primary key rows when adding an orphan (fk row with no matching pk row) - if a transaction adds a primary row, it will be allowed to commit only if the transaction has exclusive locks on all foreign rows that reference the primary row at the time the primary row is added. This option is meant to mimic 5.x locking behaviour when transactions add foreign rows before primary rows (with the proviso that no two transactions concurrently add foreign rows with the same key value). Note that this option is not recommended for general use as there are a number of scenarios in which transactions will (counterintuitively) not be allowed to commit, including: - if transactions concurrently add foreign rows with the same key value when the primary row does not exist, at most 1 of the transactions will be allowed to commit (the one that adds the corresponding primary row). - if a transaction deletes a primary row and then adds it back, it likely will not be allowed to commit (unless it has somehow obtained exclusive locks on all of the matching foreign rows). ================(Build #4217 - Engineering Case #309658)================ Database validation would fail to recognize missing entries in a PK with respect to a FK. Validation was not finding missing entries in a primary key when checking a foreign key. As a result, it was possible to get referential integrity violations while rebuilding a database or index even though validation showed the database was fine. The validation now occurs as documented. That is, for foreign key indexes, validation ensures that the corresponding row exists in the primary table. As a result of this change, database validation may now take longer. ================(Build #4218 - Engineering Case #309611)================ If a column having a default value was modified using Sybase Central to remove the default, the catalog change would have been made immediately, but inserts into the table would continue to use the default until the database was restarted. This has now been fixed. ================(Build #4218 - Engineering Case #309653)================ Executing an UPDATE WHERE CURRENT OF cursor statement in a batch or stored procedure would have caused the server to hang, if the cursor was not updateable and ansi_update_constraints was on. This is now fixed. ================(Build #4218 - Engineering Case #309847)================ An expression such as "x LIKE y" would have caused the server to crash if 'y' evaluated to a string longer than the database page size (approximately). Now, the server will report the error, SQLSTATE_PATTERN_TOO_LONG if 'y' is longer than one page. ================(Build #4221 - Engineering Case #310638)================ A table containing an indexed numeric column could have become corrupt if the value of the precision option was changed to a value smaller than that of some of the values that existed in the table, and rows containing such values were subsequently modified. This has been fixed. ================(Build #4222 - Engineering Case #310784)================ The persistent index statistics could have been incorrect after an index reorganization. This problem only affected trie-based indexes and has now been fixed. ================(Build #4223 - Engineering Case #308177)================ In rare cases, it was possible that the server could have crashed when a TCP or SPX connection was being dropped due to a liveness or idle timeout, or through use of the DROP CONNECTION statement. This would only have happened on Win32 platforms and has now been fixed. ================(Build #4223 - Engineering Case #310932)================ Queries containing the NUMBER(*) function and an EXISTS predicate could have returned incorrect values for the NUMBER(*) function, if the EXISTS sub-query was flattened. The incorrect values would have been zero for each row. After this fix, the correct row number is returned. ================(Build #4224 - Engineering Case #310279)================ In certain circumstances, if a sort operation ran out of memory, rows could have been incorrectly omitted from the result of a query. In the case where rows were omitted, the QueryLowMemoryStrategy property would be incremented. This has been fixed. ================(Build #4225 - Engineering Case #311099)================ When describing a read only cursor result set of a stored procedure or batch which has references to tables contained in publication articles, the error "QOG_BUILDEXPR: could not build EXISTS" could have been reported. THis is now fixed. ================(Build #4226 - Engineering Case #310881)================ When altering a table involved adding a column with a computed or default value, row locks were obtained which, if table was large, could have caused the operation to fail. The row locks were redundant, since there already was an exclusive schema lock. The row locks are no longer obtained. ================(Build #4226 - Engineering Case #311851)================ Scrolling through a trie-based index to before the first row and then scrolling forwards, could have resulted in the scan terminating prematurely. This is now fixed. ================(Build #4228 - Engineering Case #312221)================ A permissions problem with derived tables has been fixed. ================(Build #4228 - Engineering Case #312241)================ A PRINT statement could have displayed an unreadable message in the server console or log file if the database's character set(for example utf8) was different from the OS's character set ( for example Japanese CP932 ). This has been fixed. ================(Build #4229 - Engineering Case #311850)================ When creating a stored procedure which returned a result set and the result set datatypes were not explicitly specified, if one of the result set columns was NUMERIC and the precision of the column was calculated as greater than 128, a server crash would have resulted. This has been fixed. A workaround is to explicitly specify the result set datatypes. ================(Build #4229 - Engineering Case #312098)================ The server could have attempted to update the wrong database page. If a number of transactions, (two or more), were concurrently reading a page, and one transaction updated the page, there was a very small, but non-zero, chance that it might have updated the wrong page. In many cases this would have resulted in an assertion indicating a page number or page type mismatch. This would likely only have occurred on Unix and multiprocessor (hyperthreaded) NT systems. This is now fixed. ================(Build #4233 - Engineering Case #301210)================ If a procedure which is no longer valid (eg. syntax in the procedure is no longer supported), then preparing the procedure for execution via ODBC would have caused the server to crash. This has been fixed and the error message 'procedure is no longer valid' will now be returned to the application. ================(Build #4234 - Engineering Case #314168)================ Assertions 100307 or 101412 could have occurred with encrypted databases when reading pages from the temporary file or a dbspace. This has been fixed. ================(Build #4234 - Engineering Case #314279)================ When sequentially scanning a large table, there was the possibility of cache corruption when the scan completed. This was unlikely to be observed on single processor NT/W2K/XP platforms, and was likely to be rare in any case. It is now fixed. ================(Build #4236 - Engineering Case #310700)================ When purging locks from the lock table, the lock table entries could have become misordered. It was unlikely that this would have caused problems other than assertions 200300, 200301 or 200302. For this problem to have occurred, there must have been active keyset cursors and the database either must have had more than 1 dbspace, or more than 1,000,000 pages in the system dbspace. This is now fixed. ================(Build #4236 - Engineering Case #311195)================ In versions of ASA earlier than 8.0.0, assertions 101201, 104802 and 104803 could have occurred while defragmenting a database log file, if it was in use by a server running with the -m command line option to truncate the log file at a checkpoint. In versions 8.0.0 and later, assertions 100908, 100909 and 104802 could have occurred in this same situation. When running with the -m option, the log file is truncated at each checkpoint, but this truncation could not have occurred if the file was being defragmented concurrently. This has now been fixed. Note: Use of the -m switch is not advised, please read the documentation before using this server command line switch. To avoid database file fragmentation, it is recommended that where this option is used, the transaction log be placed on a separate device or partition from the database itself. It is also not recommended to defragment any database files while they are in use. ================(Build #4236 - Engineering Case #312388)================ Severs running on Win32 multi-processor systems could have hung, crashed or failed with an assertion, due to a bug which allowed two threads to be active simultaneously in a critical section. This issue was unlikely to have appeared on single processor systems. It has now been fixed. ================(Build #4237 - Engineering Case #240450)================ If a user was using a view or executing a procedure owned by a different user, and then the permission to use the view or procedure was revoked, the user could still have used the view or procedure until the server was restarted. This has been fixed - the revocation now takes place immediately. ================(Build #4237 - Engineering Case #311055)================ If a computed column referenced another column which appeared in a CHECK constraint, the computed column could be incorrectly set to NULL. For example, the following table definition would have caused the problem: create table T( x integer check( 2*x >= 0 ), y integer COMPUTE (2+x) ) An UPDATE statement that modified 'x' (to a non-NULL value) would have left 'y' set incorrectly to NULL. This problem has now been fixed. ================(Build #4237 - Engineering Case #313209)================ For very complex WHERE clauses in disjunctive form, new IN predicates are now generated that can be used as sargable predicates. For an IN predicate of the form "T.X IN ( constant_1, constant_2, ...)" to be generated, it is necessary to have in each term of the disjunction, a predicate of the form "T.X = constant_i". In the example below, the query Q1 is transformed into the query Q2 where two new sargable IN predicates were generated. Example: Q1: select * from T where (T.X = c1 and T.Y = c2) or (T.X =c3 and T.Y = c4) or (T.X = c5 and T.Y = c6) or (T.X =c7 and T.Y = c8) or (T.X = c9 and T.Y = c10) or (T.X =c11 and T.Y = c12) Q2: select * from T where T.X IN ( c1, c3, c5, c7, c9, c11) and T.Y IN (c2, c4, c6, c8, c10, c12) and ((T.X = c1 and T.Y = c2) or (T.X =c3 and T.Y = c4) or (T.X = c5 and T.Y = c6) or (T.X =c7 and T.Y = c8) or (T.X = c9 and T.Y = c10) or (T.X =c11 and T.Y = c12)) ================(Build #4237 - Engineering Case #314830)================ Passing large blobs to external functions was slow, as an "optimization" for quickly reading blobs was not being used. There was also a possibility of incorrect results when accessing blobs piecewise. It was possible that if the first fetch was for exactly 255 bytes, the second fetch would have returned the first n bytes again, not the next n bytes (following the first 255). These two problem have now been fixed. ================(Build #4239 - Engineering Case #314828)================ Error strings returned from the server through a TDS connection, could have had garbage characters preceding the message. This has been fixed ================(Build #4239 - Engineering Case #315386)================ In certain rare situations, the database server could have crashed while running dbunload with the -ar, -an or -ac commandline options. This problem has now been fixed. ================(Build #4240 - Engineering Case #315543)================ If a client's character set did not match the database's character set, the embedded SQL GET DATA statement could have returned incorrect results. This is now fixed. ================(Build #4240 - Engineering Case #315556)================ Complex queries with sargable IN predicates may have had a less than optimal plan, due to the optimizer underestimating the size of intermediate result sets. For example, if a table T has a primary key on the columns (T.A, T.B) and, in a complex query, the predicates "T.A = constant" and "T.B IN ( constant1, constant2, ..)" are used to create a partial index scan on (T.A, T.B), the number of rows returned by the partial index scan may have been underestimated. This has been corrected so that the optimizer now calculates a reasonable estimate. ================(Build #4241 - Engineering Case #308876)================ If CHAINED was set to off (as is the default with TDS connections) and a statement was closed, then all locks were not released even though they should have been. This problem has now been fixed. ================(Build #4241 - Engineering Case #312222)================ If a table in the FROM clause of an EXISTS or IN subquery had a local predicate of the form "T.X = T.Y", the query may have returned an incorrect result set. For this to have happened, T.X or T.Y must be in the select list or be used in another predicate of the form "T.X = outer reference column". For xample: select * from R, S where R.X IN ( select T.X from T where T.X = T.Y ) and S.Z = R.Z ================(Build #4241 - Engineering Case #313305)================ When run on Solaris, the server could have crashed on a CREATE PROCEDURE statement if it included a statement like: UPDATE ... SET ... FROM, and the FROM clause had more than 4 tables. This has been fixed. ================(Build #4242 - Engineering Case #294269)================ If the PCTFREE value for a global temporary table was changed via the ALTER TABLE statement, the changed value did not persist and was lost at the end of the connection. This has been fixed and the changes will now persist. ================(Build #4242 - Engineering Case #316016)================ If a query in a stored procedure contained a builtin function that was used either with no parameters or only constant parameters, then the function might only have been evaluated periodically, not every time that the query was executed. This was a result of plan caching, which cached the results of evaluated functions. For deterministic builtin functions, the caching did not change behaviour as the same answer would be returned for every execution of the function. However, for some functions such as rand() or connection_property(), the value of the function could be different even though the identical parameters were supplied. The caching logic has been changed so that functions which might return different values for the same inputs are now no longer cached. When using a reusable cursor, expressions over these builtin functions may now be slightly less efficient. ================(Build #4242 - Engineering Case #316073)================ Histogram updates during query processing can, in some rare and yet undetermined circumstances, cause some selectivity estimates to become invalid. This in turn can cause inefficient query plans to be chosen. The problem can be detected by looking at the selectivity estimates in query plans, the estimates can show up as values such as -1.IND#. The server will now clean up these invalid estimates when loading histograms. ================(Build #4242 - Engineering Case #316106)================ If the Java VM failed on server startup, the server might then have crashed when shutdown. This has now been fixed. ================(Build #4243 - Engineering Case #306639)================ Executing a MESSAGE statement while in passthrough mode using DBISQL would have caused a server crash, if the DBISQL connection was made using jConnect. An error (-707 Statement is not allowed in passthrough mode) is now reported. ================(Build #4243 - Engineering Case #316408)================ Executing a CREATE DATABASE statement while the server was under a heavy load, could have resulted in the server hanging. This has been fixed. ================(Build #4244 - Engineering Case #314725)================ If a procedure generated a result set using a SELECT on a view, and the view was on a table that was part of a SQL Remote publication, and the first call to the procedure was made using a read-only cursor, subsequent calls to the procedure could have resulted in a "column not found" error. This error referred to columns in the SUBSCRIBE BY part of the publication definition. Now, subsequent calls to the procedure will treat the SELECT as read-only. ================(Build #4244 - Engineering Case #316471)================ If an error occurred while transferring data between the old and new databases using one of the dbunload command-line options -ac, -an or -ar switches, dbunload could have hung and the server would have used 100% of one CPU. Now dbunload will report the appropriate error message(s). ================(Build #4245 - Engineering Case #316231)================ If a procedure definition contains a percent sign, '%', it is treated either as the modulo operator or a comment delimiter, based on the setting of the Percent_as_comment option. If this option was set to OFF before such a procedure was created, the percent sign would have been stored in the catalog; otherwise, the it would have been changed to the double dash comment delimiter. If a procedure definition stored in the catalog contained a percent sign and the first user to call the procedure had Percent_as_comment set to ON, the procedure may have failed to load or may have performed incorrectly. Also, rebuilding the database may have failed, as the percent sign would have been treated as a comment delimiter and could have resulted in a syntax error. This has been fixed. Existing procedures containing a percent sign should be re-created after this fix before attempting to rebuild the database. A workaround is to use the remainder() function instead of using the percent sign as modulo operator. ================(Build #4245 - Engineering Case #316673)================ If a table is locked exclusively with LOCK TABLE ... IN EXCLUSIVE MODE, the server will by default, no longer acquire row locks for the table. This can result in a significant performance improvement if extensive updates are made to the table in a single transaction, especially if the table is large relative to cache size. It also allows for atomic update operations that are larger than the lock table can currently handle (approx. 2 - 4 million rows). A negative side effect of this change is that keyset cursors over a table locked in this fashion will not work as expected (they will return row changed warnings for every row in the cursor if any row in the database has been modified). This is most likely to affect updateable cursor with an ORDER BY (in which case the engine could turn it into a keyset cursor). This behaviour can be disabled by setting the SUBSUME_ROW_LOCKS option 'off' ('on' by default for 9.x and up). While this feature has been added to 8.0, it has been left 'off' by default. ================(Build #4245 - Engineering Case #316688)================ When using the JDBC-ODBC bridge to select a variable of type java.math.BigDecimal, the value would have been returned as a binary instead of as a string. For example: create variable d java.math.BigDecimal; set d = new java.math.BigDecimal(1000); select d; This problem has now been fixed. ================(Build #4245 - Engineering Case #316870)================ When a commit was done by a transaction while it is in the middle of a page level backup, it could have caused database corruption if a subsequent operation that required a page level undo (ie ALTER TABLE or LOAD TABLE on a table with existing data) failed and a checkpoint was done while the operation was in progress. This is now fixed. Note that this is not likely to affect most users, since the existing backup tools do not exhibit this behaviour, but it may have occurred with a user written backup tool using the page level backup api. ================(Build #4245 - Engineering Case #316904)================ Attempting to create a proxy table to a remote table with a primary key column which was a keyword would have failed. For example, attempting to create a proxy table to a table that had a primary key column named "time" would have failed. This problem has now been fixed. ================(Build #4245 - Engineering Case #316905)================ When using sa_migrate() to migrate a set of tables owned by a particular user, the migration scripts would also migrate any views, global temporary tables and system tables that were also owned by that user. The migration scripts now only migrates base tables. ================(Build #4246 - Engineering Case #316976)================ If an expressions which never returns NULL, even when its arguments were NULL, could have caused an assertion failure when used in a query containing an outer join if hash join was selected as the execution method. For example, the following query would have caused the problem to occur: select e.emp_id ee, isnull( d.dept_head_id, 999 )de from employee e left outer join department d on ee=de order by emp_fname Errors include the following: "Unknown Device Error", although other fatal errors or assertion failures were possible. This has now been fixed. ================(Build #4247 - Engineering Case #315593)================ If a column was defined as NUMERIC and the GLOBAL AUTOINCREMENT value generated for an inserted row would have been greater than 2**31, the value assigned to the column and the value returned for @@identity were incorrect. This has been fixed. Note that the use of BIGINT is recommended in this situation for improved efficiency. ================(Build #4247 - Engineering Case #316104)================ If an event handler was running when an attempt was made to upgrade a database, the upgrade would have failed to start, since another connection was active. Now the upgrade will wait for the event handler to complete before proceeding. ================(Build #4248 - Engineering Case #317464)================ When running the server with the -q switch, if an error occurred during startup, a messagebox containing the error would still have appearred. Now, the error dialog will not be displayed and the engine will silently fail to start. However, if the server is running as a service, the error message will be logged to the application event log ================(Build #4248 - Engineering Case #317536)================ The COMMENT ON COLUMN statement could sometimes have set an incorrect comment string. This would have been more likely to occur if the statement appeared as part of a batch containing other strings. The comment will now be set correctly. ================(Build #4249 - Engineering Case #315340)================ The server could crash while executing a remote procedure call that takes input parameters. This would only occurred if the remote server was using the ODBC server class This has been fixed. ================(Build #4250 - Engineering Case #315474)================ When run on an AIX machine using IBM's Power4 processor, the server could have hung or crashed. When the server would have hung, the CPU usage would have gone to 100%. This problem would only have bee seen on SMP machines. The P/630, P/670, and P/690 machines are some of the IBM machines that currently use the Power4 chip. This has now been fixed, but a workaround is to use the bindprocessor command to bind the ASA server processes to one CPU. ================(Build #4250 - Engineering Case #317780)================ When using a keyset-driven (value sensitive) cursor, attempting to fetch from the cursor after an error was reported on a previous fetch could have caused the server to crash. This has been fixed, and now fetches on any cursor types, after an error has been reported on a prior fetch, return the error: "Cursor not in a valid state", -853 ================(Build #4250 - Engineering Case #317965)================ The STR function could have returned invalid data or crashed the server, if the numeric expression parameter was less than -1E126. This has been fixed. ================(Build #4252 - Engineering Case #318451)================ When using a multi-row (wide) insert, if the first inserted row had NULL host-variables and also unspecified columns (defaulting to NULL), then the second inserted row could insert incorrect values into the unspecified columns. It was also possible for the server to write bad data to the transaction log, resulting in a corrupt transaction log. ================(Build #4252 - Engineering Case #318632)================ If fetching through a cursor backwards resulted in the cursor being positioned before the start of the result set, fetching forwards again might have returned error 100, "row not found", not the first row. The could only have happened if the query useed a comparison-based index scan which was bounded below (typically indexed_value >/>=/= constant). This is now fixed. ================(Build #4253 - Engineering Case #317852)================ A stored procedure or function that concatenating integers as strings, could have caused a server crash. For example: declare x integer; set x = 888; set x = x || 888; This is now fixed. ================(Build #4253 - Engineering Case #318803)================ Using the string concatenation operator ( || ) could have caused the server to crash or return a runtime error. This whould only have occurred if one of the strings was a long varchar. Code of the following form could have caused the problem: declare x long varchar; select a into x from test where id = 1; set x = x || ', this should fail with an error'; as a workaround use (it's actually more efficient): declare x long varchar; select a || ', this shouldn't fail' into x from test where id = 1; This is now fixed. ================(Build #4253 - Engineering Case #318840)================ The statement, ALTER DBSPACE ... ADD ... which grows a dbspace, would not have executed if other connections to the server existed. The error 42W19 (-211) "Not allowed while '<username>' is using the database" would have been reported. The statement is now allowed to execute when other connections to the server exist. ================(Build #4254 - Engineering Case #317082)================ After an application connected to a local engine or server via the shared memory, the local application could not be killed using the 'End Task' action in the task manager -- even if the user was an Administrator. The problem was introduced by the change for QTS 310658 (Non-administrative user could kill database server started as LocalSystem NT service). The problem was reproduced on Windows 2000 Professional SP3 but could not be reproduced on Windows 2000 Server SP3. This has now been corrected. ================(Build #4254 - Engineering Case #319085)================ If the first query referencing a table after a database was started contained an error in the WHERE clause, subsequent queries would return the error: Cannot find an index for field '<column name>'. Every field must have at least one index. Current IndexCount = 0. The database would have needed to be restarted to correct the problem. This has been fixed. ================(Build #4255 - Engineering Case #319250)================ Calling the system function "property( 'PlatformVer' )" would have incorrectly returned 'Windows .Net build ...' on Windows 2003. Now it returns 'Windows 2003 build ...'. ================(Build #4255 - Engineering Case #319428)================ The database server, when run on NetWare, would have eventually stopped accepting SPX connections, and may have hung on shutdown. This was due to the server running out of memory and has been fixed. ================(Build #4256 - Engineering Case #318875)================ A change in the syntax has been made to the built-in function: DB_EXTENDED_PROPERTY ( { property_id | property_name }, [, property-specific_argument [, { database_id | database_name } ] ] ) For the properties FileSize and FreePages, the property-specific_argument 'temp' has been changed to 'temporary', so that there is consistent usage for the temporary file across different statements. The orginal value 'temp' is still allowed for existing usage. ================(Build #4260 - Engineering Case #320615)================ Validate Index ensures that each referenced row exists in the index, but it did not ensure that each referenced row could be found. Now each row is looked up by value. Note that Validate Table does check for this. ================(Build #4260 - Engineering Case #320616)================ Reorganizing a comparison-based index with many entries (more than 3,000,000 in a database with a 2k page size) would have corrupted it. This is now fixed. ================(Build #4261 - Engineering Case #321429)================ The 32-bit Windows support on Win64 for Itanium does not include Address Windowing Extensions (AWE) and scattered reads. Attempting to create an AWE cache in this environment would have failed with "Insufficient memory". Similarly, if a scattered read were attempted in this environment, the IO would have failed with the server reporting an assertion failure. Now, AWE caches are not allowed in this environment and a conventional cache is used instead. Scattered reads are simulated using a large contiguous buffer (as done on other platforms). Win64 for AMD64 supports both AWE and scattered reads for 32-bit executables. Running the 32-bit engine on Win64 is not recommended. Running the native 64-bit executable is preferred. ================(Build #4264 - Engineering Case #315129)================ The server could have failed with assertion 101414 - ?AWE mapping failed", even when Address Windowing Extentions were not being used, (ie -cw). This was unlikely to occur on uniprocessor systems, so forcing the engine to run on a single processor might be a work around. This is now fixed. ================(Build #4266 - Engineering Case #318985)================ Database corruption, revealed by assertion messages, could have been possible when executing a "LOAD TABLE" statement that failed (eg. due to a duplicate primary key). This is now fixed. ================(Build #4266 - Engineering Case #320043)================ Calling the CSCONVERT function with a string larger than the database page size, would have crashed the server. CSCONVERT is called by some of the external system functions like XP_SENDMAIL. As a result, a call to XP_SENDMAIL with a message body larger than the size of a database page would likely have crashed the server. This has been fixed. ================(Build #4267 - Engineering Case #320645)================ The server could have crashed when searching a trie-based index for long strings not in the column's domain. Typically for this to occur, the string would have to have been greater than 255 characters in length. ================(Build #4268 - Engineering Case #321729)================ When running the Win32 server or client software on a Win64 platform, the SPX port would not have been started. The SPX port is now disabled for 32-bit software running on 64-bit platforms. ================(Build #4268 - Engineering Case #321743)================ If a database or transaction log file was NTFS-compressed, the file fragment count could have been incorrect. NTFS-compressed file are now handled correctly. Note, the file fragment count is available through the system functions db_property('DBFileFragments') and db_property( 'LogFileFragments' ), and can be displayed in a warning at startup if the fragment count is high. ================(Build #4268 - Engineering Case #321812)================ A new server-level property, "NativeProcessorArchitecture", has been added. On platforms where a processor can be emulated (such as X86 on Win64), this property returns a string that identifies the native processor type. In all other cases, property( 'NativeProcessorArchitecture' ) will be equal to property( 'ProcessorArchitecture' ). For example, the following values are returned: For the 32-bit (X86) Windows NT engine running on Win64 for Itanium Property( 'NativeProcessorArchitecture' ) returns 'IA64' Property( 'ProcessorArchitecture' ) returns 'X86' For the 32-bit (X86) Windows NT engine running on Win64 for AMD64 Property( 'NativeProcessorArchitecture' ) returns 'AMD64' Property( 'ProcessorArchitecture' ) returns 'X86' In all other cases, property( 'NativeProcessorArchitecture' ) returns the same value as property( 'ProcessorArchitecture' ) ================(Build #4271 - Engineering Case #322005)================ After installing Service Pack 6 for NetWare 5.1, or Service Pack 3 for NetWare 6.0, the server would no longer detect if other servers are running with the same name. If -z was specified, messages would have appeared in the console saying "Could not enable broadcasting" and "Broadcast send failed". This was due to a bug in BSDSOCK.NLM shipped with these two service packs. The ASA server will now detect this bug and work around it, and will display a message on the ASA console to that effect. We recommend that a newer version of BSDSOCK.NLM be downloaded from Novell when it is available. ================(Build #4271 - Engineering Case #322348)================ A procedure containing a comparison of a variable with a subquery involving proxy tables would have resulted in the error: OMNI cannot handle expressions involving remote tables inside stored procedures An example of this situation is: create procedure p() begin declare myvar int; set myvar = 1; if myvar = (select col from remote_table where pk = 45) then message 'found' else message 'not found' end if; end This statement will now execute correctly. ================(Build #4272 - Engineering Case #322265)================ TDS connections (ie jConnect) to Turkish databases (for example, using collation 1254TRK) would have failed with the error, ASA error -200: Invalid option 'AUTOMATIC_TIMESTAMP' -- no PUBLIC setting exists This has been fixed. ================(Build #4273 - Engineering Case #320389)================ Index scans on databases create with a version prior to 5.0, (that may have been upgraded), could have returned too many rows. This problem only affected indexes that were not fully hashed. This problem has been fixed. The recommended work around would be to do an unload/reload of the database, but rebuilding the affected indexes would do as well. ================(Build #4273 - Engineering Case #321160)================ The error, "-189 - Unable to find in index '{index name}' for table '{table name}', would have been reported whenever INSERT ... ON EXISTING UPDATE was used on a table having computed columns and the computed column expressions referenced an indexed column. For example: create table T1(pk int not null primary key ,csc int null compute (pk+0)); insert into T1 (pk) Values(3); commit; insert into T1 (pk) on existing update values(3); This has now been fixed. ================(Build #4273 - Engineering Case #321666)================ Sequential table scans at isolation levels 1 and 2 did not block on uncommitted deletes from other transactions, but skipped the rows. READ_PAST_DELETED has now been added which changes this behaviour. When ON, (the default), sequential scans at isolation 1 and 2 will skip uncommitted deleted rows as before, but when OFF, sequential scans will block on uncommitted deleted rows at isolation levels 1 and 2, until the deleting transaction commits or rolls back. ================(Build #4273 - Engineering Case #322602)================ On all Unix platforms except Solaris and Linux, a semaphore is created to test if semaphore sets are allowed on the current platform. Only on AIX, this semaphore was not being deleted. This is now fixed.. ================(Build #4273 - Engineering Case #322619)================ Connection parameters requiring character set conversion could have been followed by garbage characters. Depending on the parameters affected (for example userid or password), this could have caused the connection to fail. This has been fixed. ================(Build #4275 - Engineering Case #305153)================ If an integrated logon was invalid (ie the logon request was coming from a machine on a different domain and cannot be properly verified) then the connection would seem to have succeeded even though the client would eventually time out. The problem has been resolved and a proper error message is now returned immediately. ================(Build #4275 - Engineering Case #307980)================ If a query used SELECT FIRST, the optimizer might have chosen a poor access plan; in particular, the optimizer might have made a poor choice of the index to use with a particular query. In the reported case, the customer had a query of the form SELECT FIRST * FROM base_table WHERE <condition> ORDER BY <indexed column> In this case, the <condition> in the WHERE clause was highly selective, and could be used as a sargable predicate (that is, the engine could use an index on base_table). However, because of a costing error, the optimizer instead chose a plan utilizing the index on the column specified in the ORDER BY clause, a much more expensive choice in real terms. This has now been fixed, but as a workaround, one could replace SELECT FIRST with SELECT TOP 1. ================(Build #4275 - Engineering Case #322102)================ Each time that a server starts a database that has been initialized with 8.0.x software (or later), it allocates a number of memory buffers that are used to improve I/O performance. The size of these buffers is dependent on the page size of the database, so the larger the page size, the larger the piece of contiguous memory that is required. If the server were to start a large number of databases that have been initialized with a large page size, the server's address space may have been exhausted or become fragmented and therefore fail to allocated one or more of these buffers. In this situation, the server would have failed with assertion 101413. The server will now attempt to reduce its memory usage (i.e. to not allocate as many buffers) when a database is started read-only. ================(Build #4275 - Engineering Case #322888)================ The dbbackup utility (dbbackup -x) could have hung (even if there were no outstanding transactions), until any connection did a commit, rollback or disconnect. In order for this to occur, the backup had to take (or be blocked) for longer than half of the checkpoint time. This has been fixed. ================(Build #4275 - Engineering Case #322910)================ If the MDSR encryption option was not installed, then running dbinit, (or using 'CREATE DATABASE') and specifying MDSR encryption would have resulted in the error "Database creation failed: ". The message now reads "Database creation failed: MDSR is not available". ================(Build #4275 - Engineering Case #322912)================ If the server was started without a -n command line option to name it, but the filename or alias of the first database listed was longer than 40 characters, the server would have used that full filename or alias as the server name, rather than truncating it to 40 characters. If dblocate or the Find Servers feature of dbisql or Sybase Central was used and found this server, the server could have crashed. This has been fixed. ================(Build #4275 - Engineering Case #323070)================ If a user made a Remote Procedure Call that involved numeric parameters, then the call may have failed (if connected to ASE or any other Data Direct ODBC datasource) or the parameters would not have been passed correctly. The precision and scale would also not have been passed correctly to the ODBC driver. This problem has now been fixed. ================(Build #4276 - Engineering Case #323179)================ A SELECT statement containing a CASE expression would have failed on big endian platforms whenever the WHEN clause specified a constant expression within the range -32768 to 32767 inclusive. This is now fixed. ================(Build #4278 - Engineering Case #323062)================ If a database was autostarted by a connection request, the engine should have returned an "Unable to start database" error if there were already 255 databases started. The engine however did not return any error, even though the connection was not established and the database was not started. This problem has now been fixed. ================(Build #4278 - Engineering Case #323655)================ If a table was renamed to a name longer than 128 characters, the table would have become inaccessible. Attempting to rename a table to a name longer than 128 characters will now generate an "identifier 'xxx...' too long" error. ================(Build #4278 - Engineering Case #323706)================ Specifying 'PCTFREE 0' on the CREATE TABLE statement had no effect and the PCTFREE specification was left as the default value. With this change CREATE TABLE will work as intended. Note that specifying 'PCTFREE 0' on the ALTER TABLE statement works correctly and can be used after CREATE TABLE to achieve the desired specification. ================(Build #4279 - Engineering Case #320239)================ If remote function was defined (using CREATE FUNCTION ... AT ...), and it did not fully qualify the function name in the location string, then attempting to call the remote function would have crashed the server. This problem has now been fixed. ================(Build #4279 - Engineering Case #322436)================ The datatype of CURRENT PUBLISHER, as reported by select exprtype('select current publisher',1) would have been different depending on whether or not a Publisher was defined. The data type will now be varchar(128) consistently. ================(Build #4279 - Engineering Case #323954)================ Attempting to start a database in read-only mode would have crashed the runtime engine if the database had an associated transaction log. The runtime engine will now start successfully. A workaround is to disable the transaction log using "dblog -n ...". ================(Build #4279 - Engineering Case #323973)================ A server crash at an inopportune moment could have resulted in a corrupt database. This was more likely to have occurred with 9.x servers, and with 8.x servers running 8.x databases. It was unlikely to have occurred with 8.x and earlier servers when running against 7.x or earlier databases. This has been fixed. ================(Build #4280 - Engineering Case #324348)================ If a stored procedure contained remote queries, and the server encountered an error while building a cursor on those remote queries, then the server would have leaked memory. This has now been fixed. ================(Build #4281 - Engineering Case #322453)================ When a server with the Quiet Mode command line option (-q) was started as a Windows service that was allowed to interact with the desktop, any MESSAGE statemnts executed by the server caused the server window to be enabled. ================(Build #4281 - Engineering Case #324489)================ With recent changes made to improve semantic checking for GROUP BY queries, and to ensure consistent results for very complex queries, it was possible though unlikely that rewrite optimizations that were performed on such queries may have lead to a server crash. This problem has been corrected. For example, the following query SELECT T4.col3 a1,T1.col2 a2,avg(DISTINCT T3.col2) a3,max(T4.col2) a4, min(T2.col3) a5,count(T4.col2) a6,list(T2.col2) a7, sum(T4.col3) a8,sum(T2.col1) a9,sum(T3.col3) a10,max(T4.col3) a11, count(T2.col3) a12 FROM tab5 T1 JOIN tab4 T2 ON T1.col1 = T2.col2 RIGHT OUTER JOIN tab5 T3 ON T2.col3 = T3.col3 JOIN view5 T4 ON T3.col2 = T4.col3 WHERE ( T4.col1 + T3.col1 >= ALL ( SELECT T3.col3 - T1.col3 - T2.col2 - T3.col3 + T1.col2 + T3.col3 + T2.col2 + 0 FROM tab5 T1 JOIN view4 T2 ON T1.col3 = T2.col3 JOIN tab3 T3 ON T2.col1 = T3.col2 WHERE T3.col2 <= 398 )) OR (T1.col2 + 0 >= ALL ( SELECT T2.col3 - T1.col2 * 0 FROM tab3 T1 JOIN view5 T2 ON T1.col2 = T2.col3 WHERE ( T2.col3 - T1.col3 + 1 = ANY ( SELECT T1.col2 * 0 FROM tab5 T1 JOIN tab1 T2 ON T1.col1 = T2.col3 )) OR (T2.col3 <= 350 ) ) ) GROUP BY T4.col3, T1.col2 HAVING T4.col3 >= T4.col3 INTERSECT SELECT T2.col2 + T1.col2 * 0 a1, T3.col2 + T1.col2 + 0 a2, T2.col2 * 0 a3, T1.col3 - T3.col1 a4, T1.col3 * T2.col3 a5, T1.col3 + T2.col3 - T3.col3 - T1.col3 + 1 a6, T3.col1 + T1.col1 + T2.col1 * T3.col3 a7, T2.col2 + T3.col1 a8, T1.col2 + 1 a9, T3.col2 + T1.col2 + 1 a10, T2.col3 + 1 a11, T1.col3 - T2.col1 - T3.col3 + T2.col1 + T3.col2 + T1.col3 + T2.col3 * 0 a12 FROM view3 T1 JOIN tab1 T2 ON T1.col2 = T2.col2 JOIN view3 T3 ON T2.col3 = T3.col2 WHERE T1.col2 <> 240 could have crashed the server; the rewrite optimization is the transformation of the HAVING predicate T4.col3 >= T4.col3 into T4.col3 IS NOT NULL. ================(Build #4281 - Engineering Case #324622)================ Queries with outer joins, where there were predicates involving IN() or ALL() conditions, may have been incorrectly rewritten as inner joins, producing incomplete or incorrect results. This may have happened to IN() conditions if there were multiple terms, at least one of which was not null-rejecting and may have happened to ALL() conditions if the subquery returned no rows (in this case, the predicate was automatically true). Two examples: SELECT T2.col3 a2 FROM qts324622 T2 RIGHT OUTER JOIN qts324622 T3 ON T2.col3 = T3.col3 WHERE T2.col2 = ALL ( SELECT col4 from qts324622 where col1 > col2 and col2 > col1 ) SELECT * FROM qts324622 T1 LEFT OUTER JOIN qts324622 T2 ON T1.col1 = T2.col2 WHERE T1.col1 IN ( T1.col1, T2.col1 ) In both cases, the outer joins were rewritten as regular joins, causing some rows to be missed. The IN() problem has been fixed in versions 8.0.2 and up, while the ALL() problem has been fixed in versions 9.0.0 and up. ================(Build #4281 - Engineering Case #324675)================ The first call to an external stored procedure on a multiprocessor Windows NT, 2000, XP or 2003 machine could have caused the server to crash. Subsequent calls were safe. This has now been fixed. ================(Build #4282 - Engineering Case #322549)================ A complex query involving selects on blob columns could have caused the server to generate "unknown device error". The failure occurred when particular execution plans were used by the server. This problem has now been fixed. ================(Build #4282 - Engineering Case #323275)================ When connected to a database with the Japanese collation 932JPN, executing a CREATE PROCEDURE, FUNCTION or TRIGGER statement, which had Japanese characters with the second byte as \x7d, would have caused a syntax error (ASA error -131). This problem has been fixed. ================(Build #4282 - Engineering Case #324627)================ When a server with the -qi command line option (quiet - no window and no icon)) was started as a Windows servicep, any MESSAGE statemnts executed by the server caused the System Tray icon to be displayed. This has been fixed. ================(Build #4283 - Engineering Case #324683)================ If the Unicode translation library was missung (dbunic9.dll for 9.x, libunic.dll otherwise) then calling the COMPARE() or SORTKEY() functions would have caused the server to crash. Now the functions fail with an Invalid Parameter error, without crashing the server. ================(Build #4284 - Engineering Case #320882)================ Writing a message to the server window with the MESSAGE statement which contained Japanese characters, would not have displayed correctly on a Linux machine running in a Japanese environment. This has been fixed, the euc-jp code page is now supported. ================(Build #4284 - Engineering Case #322431)================ When creating a view, the server must store the CREATE VIEW statement with all the referenced tables qualified with the owners. If a table appeared multiple times in the view definition, the second and subsequent references were not being quailified. For example, when created by USER1 create view V1 as select * from A join B, A join C this view was stored as create view V1 as select * from USER1.A join USER1.B, A join USER1.C As a result other users could not execute the view and a database rebuild would have failed because table "A" could not be found. This has been fixed. ================(Build #4284 - Engineering Case #325000)================ If a query's WHERE clause satisfied the conditions given below, the server would have crashed during optimization. This problem has now been fixed. (1) the WHERE clause must have contained a tautology (found in the original WHERE clause or generated by a rewrite optimization) (2) there were at least two equijoin predicates referring to the same column. (ie, there were at least two predicates of the form "T.col1 = R.col1 AND T.col1 = S.col1"). For example: T.col1 = R.col1 and T.col1 = S.col1 and ( (T.col2 >=100000 and T.col2 < 2000000 and expr1 >= 1000) or (T.col2 >=2000000 and expr1 >= 10000) ) In this case a tautology was generated by one of the rewrite optimizations, namely "T.col2 < 2000000 OR T.col2 >= 2000000". ================(Build #4284 - Engineering Case #325022)================ While updating column statistics in response to queries involving BETWEEN predicates, the server could have crashed. Whether the crash occured or not, depended upon the particular query plan chosen for execution. This has now been fixed. ================(Build #4284 - Engineering Case #325024)================ If a stored procedure contained code for creating another database object, (such as another stored procedure) and a SET USER command was executed while the stored procedure was running, it was possible for the object to have been created with an incorrect user in the transaction log. This problem has been resolved. ================(Build #4284 - Engineering Case #325093)================ If the server was started with the -qs command line option, and a usage error occurred, a usage dialog would have appeared on Windows platforms. The usage dialog is now suppressed if -qs is on the command line. Note that including -qs within @filename or @environment variable command line expansion will not suppress the usage dialog. Also, if a usage error now occurs, a message is appended to the -oe error log file on all platforms. ================(Build #4286 - Engineering Case #320876)================ When using the Foreign Key wizard on Unix versions of Sybase Central, in some instances the last foreign column selection chosen by the user would be ignored. This has been fixed. ================(Build #4286 - Engineering Case #324400)================ The server could have crashed when optimizing a query that contained the same table with two correlation names in the FROM clause with the primary keys of the two correlations equated and a full outer join also present. This problem has been fixed. For example, the following query showed the problem. SELECT 1 FROM ((tab1 T7 , tab1 T9) FULL OUTER JOIN tab2 T10 ON T9.col3 = T10.col2) LEFT JOIN tab2 T11 ON T10.col2 = T11.col3 WHERE T7.col1 = T9.col1 ================(Build #4286 - Engineering Case #324897)================ If a DELETE TRIGGER statement failed, a subsequent DELETE of a row from the table would have caused a server hang. For this to have occurred, the trigger must have failed due to an attempt to delete a row that still had foreign keys referencing it, The Wait_for_commit option must have been off, and the table being deleted from must have had a trie-based index as the index with lowest index id [e.g. the pk index if a pk exists]. This has now been fixed. ================(Build #4286 - Engineering Case #325403)================ Calling a proxy stored procedure (e.g. dbo.sp_remote_tables) would have resulted in a heap page being left locked in the server's cache. If the procedure was called many times, this could have exhausted the cache as well as cause the temporary file to grow. This is now fixed. ================(Build #4287 - Engineering Case #322634)================ Fetching the last row of a query using an ESQL widefetch or ODBC fetch with a rowset size greater than 1, could have been slow. Fetching the last row in this case could have taken as long as fetching all previous rows. Fetching rows one at a time could fetch the last row more quickly than when using a widefetch. This has been fixed so that the last fetch of a widefetch is now as quick as the last row of a single row fetch. Note if the cursor type is ESQL SENSITIVE or ODBC DYNAMIC, and isolation level 1 is used, the widefetch of the last row may still be slower than a single row fetch, due to the cursor stability requirement. ================(Build #4287 - Engineering Case #325861)================ In some rare situations a 64-bit server could have failed to correctly read column statistics that were created in the database by a 32-bit server. The failure could also have lead to the 64-bit server crashing. This has been fixed. ================(Build #4287 - Engineering Case #333111)================ When optimizing a query that referenced proxy tables, the server unnecessarily calculated the cost of disk I/O for the proxy tables. This has been fixed. ================(Build #4288 - Engineering Case #322442)================ After a system reboot, user login or Explorer restart, the system tray icon of the database engine did not appear immediately. The first checkpoint or message to the server window would have caused the system tray icon to be displayed. This has been fixed, now the system tray icon is visible immediately. ================(Build #4289 - Engineering Case #326025)================ Attempting to convert a string like 'May 1999' to a date or timestamp, would have failed with a conversion error when the Date_order option was set to 'DMY'. The value will now be converted using a default day of 1. ================(Build #4290 - Engineering Case #323893)================ If a SELECT statement inside a procedure was of the type "SELECT * from derived_table", the server may have crashed when trying to reuse the cursor for the statement. This has been fixed. Example: create procedure GetTest1( ) as begin select c0 from ( select testA0 as c0 from TEST_A union select testA0 as c0 from TEST_A ) as ALLTEST( c0 ) end call GetTest1() ; ================(Build #4290 - Engineering Case #326219)================ Some pages that were allocated then freed by the database server, may not have been reused after the next checkpoint. This problem could have resulted in the server growing the database file unnecessarily, as the file would have been grown to create new free pages rather than using existing free pages within the database file. However, all of the free pages would have been recognized and reused if the server was shut down and restarted (until the first checkpoint occurred afterwards). This problem only affected databases created with 8.0.0 or later and which had a page size of at least 2K. It has now been fixed. ================(Build #4291 - Engineering Case #325741)================ When the server was running on NetWare, if a string containing the '%' character was displayed on the server console (through the MESSAGE statement or request-level logging), the server could have displayed garbage or crashed. This has been fixed. ================(Build #4291 - Engineering Case #326164)================ The server could have crashed when sampling trie-based indexes. For this to have occurred, there must have been no entries in the index being sampled, while there were rows in the underlying table. This could only have occurred if another transaction had concurrently deleted the last row in the table, while the sampling was in progress. This has now been fixed. ================(Build #4292 - Engineering Case #291086)================ Error checking and execution of queries with a GROUP BY clause could have failed in many cases, resulting in failure to give an error, wrong results, or server crashes. A problem could have appeared any time an alias was defined in one context and used in another (where possible contexts are inside and outside an aggregate function, in the select list, in the WHERE clause, in the HAVING clause, and in the ORDER BY clause). For example, the query select max(e), emp_id e from employee did not return an error, although it should have because emp_id appears in the select list but not the GROUP BY clause. Errors are also not returned in most cases involving views or derived tables. For example, the query select tname, List(distinct cname) from sys.syscolumns where tname = 'systable' should have returned an error because tname does not appear in the GROUP BY clause. Problems could also have occurred when an expression was formed from GROUP BY elements without exactly matching one, or when subselects were aliased and used in the WHERE clause of a grouped query. In general, any grouped query using aliases, views or derived tables was suspect. These problems are now resolved ================(Build #4293 - Engineering Case #322474)================ If a loop in a procedure contained a "select ... into #tmp ..." to create a temporary table as well as "drop table #tmp" and the loop iterated many times, the server would eventually have failed with assertion 101506 - allocation size too large when reallocating memory. This has been fixed. ================(Build #4293 - Engineering Case #323652)================ If an update affected the primary key columns for a table, more than one row was modified, and an AFTER row-level trigger was defined on the table, the update could have caused the server to crash. Whether or not a crash would have occurred depended on additional factors, such as the number of rows in the table, the access plan used to perform the updates, and the actions within the trigger. This has been fixed. ================(Build #4293 - Engineering Case #326616)================ Executing an unsupported statements when connected to the utility_db could have reduced the cache memory available. Executing many unsupported statements could have caused performance degradation or even caused the server to run out of memory. When connected to the utility_db database, statements such as CREATE DATABASE, START DATABASE, etc are supported. Unsupported statements give the error "Permission denied: you do not have permission to execute a statement of this type" (-121). This has been fixed so that available cache memory is not reduced by unsupported utility_db statements. ================(Build #4294 - Engineering Case #326720)================ Calling the system procedure xp_startsmtp, with smtp_sender=null, could have resulted in the server crashing. This has been fixed. ================(Build #4294 - Engineering Case #326733)================ The functions xp_startmail, xp_startsmtp, xp_sendmail, xp_cmdshell, xp_read_file, and xp_write_file would have failed on Windows CE if character set conversion was required between the database character set and the OS character set. This has now been fixed. ================(Build #4294 - Engineering Case #326745)================ If a stored procedure, which opened a cursor on another stored procedure call, was called many, many times, by an application usin jConnect or Open Client, the result set for the second stored procedure may have been described to the client even though no data would ever have been returned for that result set. This problem has now been fixed. ================(Build #4294 - Engineering Case #326799)================ The MobiLink server may have generated an ODBC error, "function sequence error", when uploading a table with blob columns. This would only have occurred if: - the table had a nullable column before the blob column - an index column followed the blob column - the data for the column before the blob column was NULL This has been fixed, but a workaround is to make sure there are no index columns following any blob columns. ================(Build #4295 - Engineering Case #309290)================ An UPDATE statement of the form: update Employee e set e.emp_fname ('x') where: - the column to be updated was qualified with a correlation name - the "=" was missing - the expression being assigned was enclosed in parentheses would result in a server crash. An error (Set clause for column 'a' used incorrectly) will now be reported. ================(Build #4295 - Engineering Case #326980)================ Now, when the server detects a deadlock situation, if there is a transaction with a blocking_timeout specified, the one with the earliest deadline will be chosen as the victim to be cancelled. ================(Build #4296 - Engineering Case #324988)================ For queries with more than one table and equijoins predicates (e.g., 'key joins'), the error "Dynamic Memory Exhausted" may have been generated if the server ran with a very small cache. This issue has been fixed. An Example: select * from systable T key join syscolumn C key join sysuserperm U ================(Build #4299 - Engineering Case #324334)================ Queries that contained a nested block join with a Work Table operator above, could have caused the server to crash if the nested block join returned a string column. For example, this type of plan can be selected if a hash join is used below a nested block join. This is now fixed. ================(Build #4299 - Engineering Case #327304)================ If a user's password was changed to something containing a semi-colon (';'), connecting as that user was no longer possible, except from a another connection by a user with dba authority and not specifying a password. This has been fixed - the GRANT statement will now fail if the password contains a semi-colon. ================(Build #4299 - Engineering Case #327704)================ A connection over namedpipes, which used a communication buffer size greater than the default 1460 bytes, could have failed with a communication error, if a request or response was larger than the default packet size. The communication buffer size is specified with the -p server option or the CommBufferSize (CBSIZE) connection parameter. This has now been fixed so that communication errors no longer occur. ================(Build #4300 - Engineering Case #325437)================ Queries with many nested 'ANY (subquery)' predicates may have had a large OPEN time, due to rewrite optimizations applied while flattening subqueries. For this to have occurred, all the subqueries had to have been flattenable and many equality predicates were part of the original query or could have be inferred for some of the subqueries. For example: select * from t0 where t0.c2 in (select t1.c2 from t1 where t1.c2 in (select t2.c2 from t2 where t2.c2 in (select t3.c2 from t3 where t3.c2 in (select t4.c2 from t4 where t4.c2 in (select t5.c2 from t5 where t5.c2 in (select t6.c2 from t6 where t6.c2 in (select t7.c2 from t7 where t7.c2 in (select t8.c2 from t8 where t8.c2 in (select t9.c2 from t9 where t9.c2 in (select t10.c2 from t10 where t10.c2 in (select t11.c2 from t11 where t11.c2 in (select t12.c2 from t12 where t12.c2 in (select t13.c2 from t13 where t13.c2 in (select t14.c2 from t14 where t14.c2 in (select t15.c2 from t15 where t15.c2 in (select t16.c2 from t16 where t16.c2 = 30)))))))))))))))) ================(Build #4300 - Engineering Case #326320)================ When a NULL constant is converted to a NUMERIC, a precision and scale of (1,0) is now used instead of the default set by the options Precision and Scale. This is particularly important for UNION queries such as the following: select unit_price from product union all select NULL from dummy Previously, the data type of the result would have been desribed as a NUMERIC(30,6) (with default precision and scale settings). Now, it is described as NUMERIC(15,2), the data type of the unit_price column. Explicit conversions to NUMERIC will use (1,0), if the conversion does not provide a precision and scale. For example: SELECT cast( NULL as numeric ) A, cast( NULL as numeric(15,2) ) B will be described as: A NUMERIC(1,0) B NUMERIC(15,2) Now, the behaviour of NULL constants is more consistent with that of other constants, where the precision and scale is selected to be as small as possible. ================(Build #4300 - Engineering Case #327432)================ For very complex WHERE clauses in disjunctive form, new IN predicates are now generated that can be used as sargable predicates. For an IN predicate of the form "T.X IN ( constant_1, constant_2, ...)" to be generated, it is necessary to have in each term of the disjunction a predicate of the form "T.X = constant_i". In the example below, query Q1 is now transformed into query Q2, where two new sargable IN predicates are generated. Example: Q1: select * from T where (T.X = c1 and T.Y = c2) or (T.X =c3 and T.Y = c4) or (T.X = c5 and T.Y = c6) or (T.X =c7 and T.Y = c8) or (T.X = c9 and T.Y = c10) or (T.X =c11 and T.Y = c12) Q2: select * from T where T.X IN ( c1, c3, c5, c7, c9, c11) and T.Y IN (c2, c4, c6, c8, c10, c12) and T.X IN ( (c1, c2), (c3, c4), (c5, c6), (c7,c8), (c9,c10), (c11,c12) ) ================(Build #4300 - Engineering Case #328084)================ Predicates referring to undeclared host variables and string columns, were not considered sargable. Hence, the predicates wouldn't have been used for an index scan if an appropriate index existed. For example: create table T (c varchar(100) NOT NULL, b int NOT NULL, PRIMARY KEY (c, b) ); select ulplan( 'SELECT * from T WHERE T.c = ? and T.b = ? '); The plan for the above query wouldn't contained an index scan, when in fact the primary key index would have been appropriate to be used here. This is now fixed. ================(Build #4301 - Engineering Case #327642)================ User functions that had a procedure id (proc_id in SYSPROCEDURE) that was greater that 32k would have always returned NULL. This has been fixed, these functions now return the correct return value. ================(Build #4301 - Engineering Case #327943)================ Before the Conjunctive Normal Form (CNF) algorithm is applied to a WHERE clause, disjunctions of the form "X = 10 OR X = 20 OR X IN (40, 50)" are now transformed into IN lists (i.e., X IN (10, 20, 40, 50)). Also, disjunctions of the form "X = 10 OR X = 20 OR X=30" are also transformed into IN lists (i.e., X IN (10, 20, 30)). These transformations reduce the number of predicates in a WHERE clause, hence some of the rewrite optimizations (such as CNF) that are done for WHERE clauses, may not have been done prior to this change, and the query may now perform much better. ================(Build #4302 - Engineering Case #292648)================ If a procedure assigned a variable with the result of a subselect and then returned a result set later on, the result set was sometimes not picked up by the client. For example, consider the following procedure: create procedure DBA.test() result(xlicencas integer) begin declare xLicencas integer; declare xConnection integer; set xConnection=(select NEXT_CONNECTION(null,null)); set xLicencas=34; select xLicencas end The "set xConnection=(select NEXT_CONNECTION(null,null));" line would have caused the result set of "select xLicencas" to be dropped by the client. This problem has now been fixed. ================(Build #4302 - Engineering Case #328051)================ Complex SELECT INTO statements executed inside a stored procedure may have failed after the first call to the procedure. This has now been fixed, Work arounds are: (1) rewrite SELECT .. INTO statement as an EXECUTE IMMEDIATE statement (2) rewrite SELECT .. INTO statement as an INSERT statement (the table inserted into must be created first in this case) ================(Build #4302 - Engineering Case #328387)================ A query with a WHERE clause containing duplicate IN lists may have returned incorrect results if the following conditions were true: (1) the duplicate IN list must have been on a base or view column (e.g., T.X IN (2,3)) (2) the duplicate IN list must have appeared in a disjunct with another IN list on the same column (e.g., "(T.X IN (4, 5) OR T.X IN (2,3))" ) (3) the WHERE clause was in Conjuctive Normal Form This is now fixed. ================(Build #4303 - Engineering Case #327225)================ A query containing a UNION with a very large number of branches would have caused an assertion failure: "101505 - Memory allocation size too large". Now, the server no longer asserts, but instead the statement fails with an error indicating that a syntactic limit has been reached. ================(Build #4303 - Engineering Case #328354)================ Prior to this fix, if the server added an index entry to an upgraded version 4 database, the index could have become corrupted. For this corruption to occur, the value being inserted must not have been fully hashed (i.e. was longer than ~9 bytes). The symptom of the corruption was that querying the index for entries with a particular value returned an incorrect (usually fewer) number of rows. Range searches would have produced the expected number of rows. While the server has been fixed and the database will no longer be corrupted, Validate Table/Index will not catch any existing corruption. A work around would be to unload/reload to a later format database. ================(Build #4303 - Engineering Case #328444)================ Queries that contained an outer reference from a subquery to a grouped query block would have failed with the error "Function or column reference to 'x' must also appear in a GROUP BY". This was not a requirement if the subquery appeared inside an argument to an aggregate function as in the following: select manager_id, max( (select emp_id from employee where salary=e.salary) ) from employee e group by manager_id This has now been fixed. ================(Build #4304 - Engineering Case #327932)================ ASA Windows applications including the server, dbremote, dbmlsync and dbmlsrv would fail to find quoted UNC style filenames specified on the command line. For example, passing the database file as "\\server\share\dir\my.db" would have failed with the error "Could not open/read database file: \server\share\dir\my.db" Attempting to use connection strings such as "...;dbf=\\server\share\dir\my.db;..." would have succeeded only if the server myengine was already running (even if the database my.db wasn't running), but would have failed if myengine was not running, due to this problem. This has been fixed so that quoted command line arguments of the form "\\server\share\etc" no longer removes the first back slash. Note that running a database from a file server can corrupt the database and is generally not recommended. ================(Build #4304 - Engineering Case #328881)================ If a DTC transaction was unenlisted while another DTC action was running, the server may have crashed. This would have been seen if an application ran concurrent DTC actions from multiple threads against the same connection. This problem has been fixed. ================(Build #4304 - Engineering Case #329090)================ If a user attempted to insert a long binary value into a proxy table using a host variable, there was a chance the server would have crashed. This problem has been fixed. ================(Build #4304 - Engineering Case #329124)================ Inserting a long binary constant into a proxy table, would have caused the inserted value to have been corrupted. This problem has now been fixed. ================(Build #4304 - Engineering Case #329294)================ When converting a NULL constant to a string type (ie CHAR, VARCHAR, LONG VARCHAR, BINARY, VARBINARY, LONG BINARY), the size would be initialized to 32767 if no length was provided. Now, the size is initialized to 0. For example, the following queries would have returned a column described as length 32767: SELECT CAST( NULL AS CHAR ) --> now CHAR(0) SELECT 'abc' UNION ALL SELECT NULL --> now CHAR(3) SELECT '' UNION ALL SELECT NULL --> now CHAR(0) SELECT IF 1=1 THEN 'abc' ELSE NULL ENDIF --> now CHAR(3) ================(Build #4304 - Engineering Case #329327)================ If a server running on a Unix platform, was started as a daemon (i.e. with -ud), then making remote ODBC connections would have failed with error -656. This problem has been fixed. ================(Build #4304 - Engineering Case #329521)================ Attempting to insert a NULL value into a NUMERIC or DECIMAL column with "default autoincrement" could have led to a server crash. The NULL value must have been cast to NUMERIC. The following statement would have caused the crash: INSERT INTO T( x ) SELECT CAST( NULL AS NUMERIC ) For other column types, there was a possibility that the value returned from @@identity would be incorrect after inserting a NULL value. The correct value should be 0. This problem is now fixed. ================(Build #4304 - Engineering Case #329528)================ Joins on more than one attribute, executed with merge join, would have incorrectly returned rows where a join attribute was NULL in both tables, provided that it was not the first attribute containing NULL. Rows with NULL join attributes will now be rejected as NULL = NULL is Unknown, not True. ================(Build #4305 - Engineering Case #329788)================ The MIN/MAX optimization (documented in "ASA SQL User's Guide/Optimization for minimum or maximum functions") was not being applied for queries containing predicates with host variables (in Ultralite), or database variables (if plan caching was used). For example, a query of the form: SELECT min( R.y ) FROM R WHERE R.x = ? should be converted to: SELECT MIN( R.y) FROM ( SELECT FIRST R.y FROM R WHERE R.x = ? and R.y IS NOT NULL ORDER BY R.x ASC, R.y ASC ) as R(y) (assuming that an index exists on R(x,y) ). Further, a query in a stored procedure that used SQL variables (CREATE VARIABLE or DECLARE) or procedure/function parameters, would not have allowed the optimization when a query was optimized for plan caching. A symptom of this is that a stored procedure would execute more slowly after a few initial iterations, and a query in the procedure met the conditions for this optimization. A work-around would be to set MAX_PLANS_CACHED=0 to prevent plan caching. Both these problems have now been fixed. ================(Build #4306 - Engineering Case #329901)================ As of 8.0.2, pipelined versions of hash and sort operators were introduced. This allowed the materialization of result rows from the operator to be deferred instead of occuring immediately in the operator. For UNION based queries, some branches of the union may require materialization while others do not. Previously, all rows were materialized in a work table. Now, a work table will be placed at the top of each branch that requires materialization, unless all branches require materialization. This reduces the overhead of unnecessarily materialized rows. ================(Build #4306 - Engineering Case #330075)================ A multi-threaded client application, which had multiple connections concurrently using the same debug logfile (using the LogFile connection parameter) on multiple connections, could have been missing debug messages, or possibly have crashed. Problems were more likely on a multiprocessor machine. This has been fixed. ================(Build #4307 - Engineering Case #325453)================ It was possible for the round() function to have returned an incorrect result. The number returned may have been truncated, instead of rounded, if the digit to be rounded was a 5. For example, 69.345 may have been 'rounded' to 69.34. This has been fixed. ================(Build #4307 - Engineering Case #328939)================ An incorrect input parameter length or value could have been passed when calling a remote procedure on an ODBC class remote server. This problem could also have caused a server crash in rare situations. It is now fixed. ================(Build #4307 - Engineering Case #330127)================ If a TDS (jConnect or Open Client) application made a request which returned a large amount of data (several Kb or more), and then sent a cancel request, the server could have gone to 100% CPU usage, attempting to send the cancel response. While the server was attempting to send the cancel response, checkpoints or DDL would have caused all connections to hang. Fetching a large result set with older versions of jConnect, could hang after running out of memory and sending a cancel request, causing the engine to hang indefinitely. (Current JConnect EBFs may get an java.lang.ArrayIndexOutOfBoundsException instead of hanging.) Now the server will no longer go to 100% CPU usage or cause all connections to hang when processing a TDS cancel. If the server is unable to send the TDS cancel response for 60 seconds, it will drop the connection. ================(Build #4307 - Engineering Case #330234)================ The TIMESTAMP_FORMAT used when one connection queried another connection's last request time (i.e. connection_property('LastReqTime',some_other_conn_id)) would have been the other connection's format, not the current connection. This has been fixed. This change also fixes the case where the server could have crashed if a connection queried another connection's last request time at the instant that the other connection was being created. ================(Build #4308 - Engineering Case #330481)================ For a query where IN-list merging took place, followed by CNF to DNF conversion, the result of the conversion may have been incorrect. This could only have happened if a literal altered by the IN-list merging appeared in more than one conjunct. For example, in the following, the predicate N1.N_NAME = 'GERMANY' appears in two conjuncts and the second appearance is changed to N1.N_NAME IN ('GERMANY', 'FRANCE') by IN-list merging. (N1.N_NAME = 'GERMANY' or N2.N_NAME = 'GERMANY') and (N1.N_NAME = 'FRANCE' or N2.N_NAME = 'FRANCE') and (N1.N_NAME = 'GERMANY' or N1.N_NAME = 'FRANCE') and (N2.N_NAME = 'FRANCE' or N2.N_NAME = 'GERMANY') This has been fixed. Note that this is the same problem that was partially fixed for 328387. ================(Build #4310 - Engineering Case #332163)================ After a successful load of a large table, the server creates a histogram for each column in the table to represent the data distribution for the column values. The histogram is subsequently refined in response to queries executed by the server. Over time it was possible for the histogram quality to degrade, causing the server to incorrectly assume zero selectivity for some equality predicates. This problem has been corrected. ================(Build #4312 - Engineering Case #299066)================ If an UPDATE statement used an index on a column defined with DEFAULT TIMESTAMP, it could have looped infinitely. This is now fixed. ================(Build #4312 - Engineering Case #331328)================ If a stored procedure contained a statement like ALTER TABLE t1 RENAME t2 the statement would fail the second time the procedure was called, with the error: Table 't2' not found This has been fixed. A workaround is to execute the statement using EXECUTE IMMEDIATE. ================(Build #4313 - Engineering Case #329570)================ If a database's collation was 1254TRK , built-in functions could not be referenced if the function name was in upper case. This has been fixed. ================(Build #4313 - Engineering Case #331147)================ If a table had a computed column with an expression that referenced a user defined function, and had a foreign key defined, then an unload/reload operation would have failed. The failure would have occurred during the reload phase, creating the foreign key. This was due to the values of the computed column being recalculated during the creation of the foreign key, but at this stage of the reload, the user defined function had not yet been defined. This has been fixed by not recalculating computer column values when creating foreign keys. ================(Build #4313 - Engineering Case #332134)================ If the Compute clause for a column contained a subquery, with an unresolved reference to a column name that matched one of the columns in the table, then the server could have crashed while creating the computed value. For example: create table t (c1 int); alter table t add c2 int compute( (select c1+1) ) This problem has now been resolved. ================(Build #4315 - Engineering Case #320339)================ Executing a SELECT ... INTO ... would have crashed the server if it contained a single row aggregation which returned a string type and execution of the SELECT failed with an error. This is now fixed. ================(Build #4316 - Engineering Case #332364)================ A successfully executed ALTER PROCEDURE (or FUNCTION) statement could have been written to the transaction log with an incorrect owner name if the owner name was not specified in the ALTER statement and the procedure or function was owned by a user other than the one executing the ALTER statement. This error would have resulted in failure during recovery if the logged statement needed to be replayed. As an example, assume that a procedure USER1.TEST already existed in the database and the procedure USER2.TEST did not exist. Further, assume that USER2 was able to see and modify the procedure owned by USER1. Now, if USER2 executed an "ALTER PROCEDURE TEST" statement, then the server would have resolved the procedure name as "USER1.TEST" and correctly modified that procedure. However, the statement put in the transaction log would have incorrectly referred to procedure "USER2.TEST". This problem has now been fixed. Note that the problem has an impact only when the logged statement needs to be replayed for any reason. ================(Build #4316 - Engineering Case #332636)================ Personal Servers on Windows were not detecting that another Personal Server was running with the same name if one of the servers was not using shared memory (for example if -ec ecc_tls was used).Network servers on Windows and NetWare were not giving a startup error if a network server with the same name was found on one of TCP/IP or SPX, while the other link (TCP/IP or SPX) started successfully. This only occurred if -x was not specified. This has been fixed so that servers correctly detect these cases and display an error. ================(Build #4316 - Engineering Case #332692)================ A FOR statement in a stored procedure would have crashed the server if the statement tried to use a dynamic query. This has been fixed. A workaround is to declare the cursor and variables explicitly and use a LOOP statement with FETCH statements. ================(Build #4316 - Engineering Case #332693)================ The server could have become deadlocked when dropping tables, users or groups. This was most likely to occur on multiprocessor Unix machines. For the server to have become deadlocked, another transaction must have been concurrently accessing some database object (such as a table, procedure, view) for the first time. This has now been fixed. ================(Build #4316 - Engineering Case #333003)================ When run on Windows, Java code running in the server's VM, could have thrown the Datagram socket exception: "Datagram packet too large." when receiving a single byte from an incoming datagram. . This has been fixed. ================(Build #4318 - Engineering Case #333142)================ If a statement encountered an error (e.g. row locked, foreign key violation) while running with the Chained option set to 'OFF' (i.e. INSERTs, UPDATEs and DELETEs are automatically commited), then any locks acquired by that statement would not have been released when the statement completed. This could result in other connections being blocked unnecessarily. This has been fixed. ================(Build #4323 - Engineering Case #330407)================ It was possible for the server to crash if two or more connections were dropping and reloading procedures concurrently. This has now been fixed. ================(Build #4324 - Engineering Case #332544)================ An incorrect result set might have been returned for a query inside a stored procedure, if a cached cursor plan was being used, and the statement contained expressions for which expression caching was being used. An example of such statement is a SELECT statement with NOT EXISTS predicates: select * from Table_1 where not exists(select * from Table_2 where Table_2.X = Table_1.X ) The cached expression had to satisfy one of the following conditions: - the expression referenced tables which changed from one call of the procedure to another (e.g., new rows are being added to those tables) (2) the expression referenced the stored procedure's parameters, which changed from one call of the procedure to another. This is now fixed. ================(Build #4324 - Engineering Case #334231)================ In a very rare timing dependent situation, a server with multiple connections could have crashed when disconnecting a TCP/IP or SPX connection. This has been fixed. ================(Build #4327 - Engineering Case #334763)================ In rare and timing dependent cases, the client or server could have crashed when a TCPIP, Named Pipes or SPX disconnect was done and at least one other connection was active. The problem affected Windows ASA clients using TCP/IP, Named Pipes or SPX; Windows ASA servers using Named Pipes; and Windows CE and Unix servers using TCP/IP. These problems are now fixed. ================(Build #4328 - Engineering Case #323180)================ A query with a large number of UNIONs or one that referenced a large number of distinct tables could have crashed the server. These types of queries will now return -890 "Statement size or complexity exceeds server limits". ================(Build #4330 - Engineering Case #333275)================ The server collects and maintains column data distribution statistics during normal operation and uses these statistics for estimating the size of query result sets, which in turn determine the access plan used. Under certain circumstances (see example below), the statistics for character columns, with a declared size greater than 7 bytes, could have caused poor plans to have been chosen. In particular, the same query could have run efficiently on the first execution and slowly on subsequent runs. To illustrate the circumstances consider the following example: create table stats(c1 int, c2 char(10)) create index stats on stats(c1, c2 ) insert into stats select row_num, 'Bogus' from rowgenerator create statistics stats The important things to note are: 1. Column c2 is a character column with size greater than 7 bytes 2. The database is case insensitive 3. There is an index with c2 as a trailing column 4. The relative number of rows that have the same value for C2 is quite large ( 100% for 'Bogus') 5. Statistics have been explicitly generated, so they are presumably in a good state 6. The number of rows in the table that have the same value for C2 for any single value of C1 is relatively small (1 row for each value of C1). Now, consider a predicate "c2 = 'bogus'" which will return 100% of the rows. Note that the value used in the predicate has a capitalization that is different from the actual values in the table. The statement select first estimate( c2, 'bogus' ) est from stats will return 100 which is the correct selectivity of the predicate and the optimizer will likely be able to come up with an efficient plan for executing a query with that predicate. Now assume that a query is executed that looks for rows with specified values for C1 and C2. An example of such a query is: select count(*) from stats where c1 = 5 and c2 = 'bogus' Since the number of rows returned is very small (1 row mentioned in (6) above), the server will likely use an index on C1, C2. If that happens, then after executing the above query, the server will update the statistics for C2 in such a manner that the resulting selectivity of C2 = 'bogus' will now be grossly inaccurate. In our example select first estimate( c2, 'bogus' ) est from stats will now return 0.39% instead of the correct value of 100%. This degradation in the statistics for C2 can now result in poor plans for queries involving the predicate. This problem has now been fixed. ================(Build #4330 - Engineering Case #335802)================ When fetching column data greater than 255 bytes in chunks, using GET DATA (ESQL GET DATA or ODBC SQLGetData), one or two extra bytes after the column data could have been retrieved. Whether or not this would have happened depended on the size of the column data, the chunk size used to GET DATA each chunk of the column, and the page size. For example, a data size of 258 bytes and a chunk size which was 256 bytes, would have caused this problem, as would a data size of 2278 bytes and a chunk size of 455 bytes. This problem was less likely with chunk sizes greater than 1K. This has been fixed so that no extra bytes are now retrieved with GET DATA. ================(Build #4331 - Engineering Case #329903)================ A query with a large WHERE clause, containing a large number of conjunctive and disjunctive predicates of literals, could have caused the server to hang with 100% cpu usage and eventually run out of memory. This has been fixed. ================(Build #4331 - Engineering Case #334492)================ The name of a user-defined type (or domain) was not being returned in its original case by a DESCRIBE USER TYPES Embedded-SQL statement. This has been fixed. ================(Build #4331 - Engineering Case #335790)================ The server could have failed with assertion 101518, "Memory allocation size too large", when executing a DISTINCT query with a large number of select expressions. The assertion would have failed if the Indexed Distinct query execution algorithm was selected by the optimizer, because the number of input rows was estimated to be small for example. The number of expressions required to cause the failure was approximately (page_size - 80)/8. This problem is now fixed ================(Build #4331 - Engineering Case #335979)================ After running for some time on Windows 2000, the server could have stopped accepting new connections over TCP/IP, although existing connections would have continued to work. If the -z switch was used on the server, a message would have appeared in the server window saying "TCP Listener shutting down (x)" where x is a number. This has been fixed. ================(Build #4331 - Engineering Case #336061)================ An application could have failed with a communication error when doing a describe, if the client's character set was a multi-byte character set that was different from the server's character set, and a described column name had extended characters. This problem would have shown up when the column name in the client's charset contained more bytes than the column name in the server's character set. Note that ODBC, OLEDB and ADO.NET client libraries often internally describe result sets even when the application has not requested result set types or names. This is now fixed. ================(Build #4332 - Engineering Case #330282)================ Whether the server cached and reused an access plan for a query embedded in a stored procedure or function, was based on any variance of the estimated execution cost of the access plans generated in two ways: - plans generated during the so-called "training period", when the values of any variables are evaluated prior to optimization (and can be considered known constants), and - a plan generated without knowledge of the values of those variables, hence representing a "generic" plan. Unfortunately, estimated costs from the optimizer alone were insufficient criteria with which to base this decision. Now, strict plan equivalence is necessary prior to marking a plan as reuseable for subsequent invocations of the procedure. As a workaround, users may turn plan caching off entirely by setting the option MAX_PLANS_CACHED to 0. ================(Build #4332 - Engineering Case #334412)================ Attempting to apply a Patch or an EBF to an 8.x NetWare install, would have failed to upgrade the server executable if the filesystem was on a NetWare server mounted using the Novell Client for Windows. This was due to a fault in the Novell Client software. A work around is to perform the Patch or EBF on a Windows machine and copy the updated software to the Novell server. Attempting to apply a second EBF to an 8.x NetWare install, would also have failed to upgrade the server executable if the filesystem was on a NetWare server mounted using the Windows Client for NetWare. This was due to a problem in the install script, and has been fixed. ================(Build #4333 - Engineering Case #170697)================ The table constraints UNIQUE and PRIMARY KEY allowed specifying the same column name multiple times, for example: create table T1 ( a integer not null, primary key( a, a )); create table T1 ( a integer not null, unique( a, a )); The ALTER TABLE statement always prevented this. Now the CREATE TABLE also returns a syntax error if the same column is used multiple times in these constraints. ================(Build #4333 - Engineering Case #336853)================ When the server's Java VM caught a "class not found" exception and put up an error message box, the class name was not included. Also when the VM caught an "UnsatisfiedLinkError", the name of the class and the missing native method were not included. This has been fixed, the exception's message text is now displayed. ================(Build #4334 - Engineering Case #205335)================ An explicit, or implicit conversion of a date/time string, with an ambiguous day or hour in the string, would not have failed with a conversion error. For example, select datetime( '1989-01-02:21:20:53' ) would have returned '1989-01-01 02:21:20.530'. This now fails with a conversion error ("Cannot convert xxx to a timestamp") because of the colon after the "02", as it is ambiguous as to whether the "02" refers to a day number or an hour. ================(Build #4334 - Engineering Case #336681)================ The datatype conversion code for expressions was causing the cast of NULL as a long varchar to be a type equivalent to varchar(1). For example, if the following query was used to create a temporary table: SELECT cast(null as long varchar) as c1 INTO #temp then attempting to insert a string longer than 1 byte would have caused the string to be truncated. This has been fixed. ================(Build #4335 - Engineering Case #337266)================ Scheduled events may have executed at the wrong time after a Daylight Savings Time change. For example, if an event was defined to fire daily at 12:05am, it would fire at 11:05pm on the evening of the change from DST to regular time and would fire at 1:05am on the evening after the change from regular time to DST. This has been fixed. ================(Build #4336 - Engineering Case #337085)================ On a PocketPC 2003 device, if the database server was using a database file located on a Secure Digital (SD) card and the card was ejected while the server was running, an assertion failure would have been reported. The problem was fixed by attempting to close and reopen the database file, rather than just retrying the I/O operation. If a different card, with another database by the same name, is inserted, the server will display a message dialog instructing the user to insert the original card. Otherwise, the old I/O error message dialog is displayed. ================(Build #4336 - Engineering Case #337570)================ If the database server was started with the command line option -ti set to a value of 32768 or greater, any TCPIP connections to the server would have failed. The application would have received error -308, Connection was terminated and the server console, would have had the message: Disconnecting Client - No activity for -32768 minutes This has been corrected. The maximum permissable value for -ti is 32767 (which is approximately 22 3/4 days). If any larger value is specified, an error message is displayed (Error in command near "ti") along with the usage message. ================(Build #4336 - Engineering Case #337624)================ The AppInfo string, returned by calling connection_property('AppInfo'), would have incorrectly returned ODBC for the OLEDB and ADO.NET providers. They have been fixed to correctly return OLEDB and ADO.NET respectively. ================(Build #4339 - Engineering Case #338081)================ Changes have been made to the cost model that the optimizer uses, in order to improve query performance for some situations. In particular, improvements have been made for queries the involve wide tables, where most of the data is in server cache and the number of rows returned is relatively small. ================(Build #4340 - Engineering Case #223745)================ The Java system properties for 'user.language' and 'user.timezone' were not returning local settings. The 'user.language' property would always have returned "en". On Windows, the 'user.timezone' property would have returned "PST", if the timezone could not be determined. Other platforms returned the Timezone string from the system locale. The 'user.language' property has been fixed for versions 9.0.0 and later, earlier version will still return 'en' always. The 'user.timezone' property on Windows will now return a string like "GMT[+/-]hh:mm" for indeterminate timezones. ================(Build #4340 - Engineering Case #337807)================ Calling a stored procedure that returned an implicit result set, or contained an EXECUTE IMMEDIATE statement, could have resulted in the error "Cursor has not been declared", if one of the statements in the procedure caused a "not found" warning to be issued. Generation of the error was also dependent on how the procedure was called. For example, the error would have occurred if the procedure was called from DBISQL, but not if it was called from DBISQLC. This has been fixed. ================(Build #4340 - Engineering Case #338114)================ Attempting to create a proxy table to a SQL Server remote server, would have failed with a "cannot obtain column information" error, if the database on the remote server had a space in it's name. This problem has now been fixed, but to make use of existing remote servers, the capability list must be rebuilt. The easiest method of rebuilding the capability list is to change the remote server class, then change it back. The following two statements will rebuild the capability list for this situation: ALTER SERVER "name of mss remote server" CLASS 'ODBC'; ALTER SERVER "name of mss remote server" CLASS 'MSSODBC'; ================(Build #4340 - Engineering Case #338425)================ When determining an optimal cache size, the size chosen never exceeded the sum of the sizes of all open database and temporary files. Now, it will not exceed the sum of the sizes of all open database and temporary files, plus the size of the main heap. ================(Build #4341 - Engineering Case #338071)================ The implementation of java.io.File.listFiles() on Windows, would always have returned an array of length 1, no matter how many entries are in the file system directory. This has been corrected. ================(Build #4342 - Engineering Case #334421)================ Support has now been added which allows the use of SELECT list expression names in the ORDER BY clause of UNION, INTERSECT or EXCEPT query expressions. For example, the following query expression: Select quantity from product Union Select quantity from product Order by 1 can now be written as: Select quantity from product Union Select quantity from product Order by quantity The first query specification of the UNION is used to determine the names to be matched with the ORDER BY clause: Select quantity as qq from product Union Select quantity from product Order by qq ================(Build #4342 - Engineering Case #338965)================ If an UPDATE statement contained an ORDER BY clause that utilized ordinal values, the statement would be accepted by the server even if the ANSI_UPDATE_CONSTRAINTS connection option was set to STRICT. This has been corrected; such statements will now receive a syntax error (SQLSTATE 42W37, SQLCODE -814). If the ANSI_UPDATE_CONSTRAINTS connection option is set to OFF or CURSORS, the error will not be generated. ================(Build #4342 - Engineering Case #339030)================ If an ESCAPE character was specified for a LIKE operator, and the pattern was invalid, a message with random characters would have been displayed. This was due to the string being passed to the message routine not being null terminated. . Note, for the pattern to be invalid, the specified escape character must not have preceded a percent sign, an underscore, a left square bracket, or another escape character in the pattern. This is now fixed. ================(Build #4345 - Engineering Case #320021)================ The server maintains row counts for catalog and user tables in the system table SYSTABLE. The row count for the table system SYSATTRIBUTE could have become incorrect during database operation. The incorrect row count could have caused an error during database validate, in addition to causing other problems. This has been fixed, the server will now keep an accurate count of rows in SYSATTRIBUTE. ================(Build #4345 - Engineering Case #336171)================ Reloading into a database with a smaller pagesize could have failed while loading statistics. The error that was returned was also misleading, as it indicated that the pagesize was too big. Statistics are now loaded only if the pagesize of the new database is equal to or greater than the pagesize of the original database. ================(Build #4345 - Engineering Case #339599)================ The server maintains the number of distinct key values for each non-unique index, among other things, this number is used by the optimizer for computing join selectivities. It was possible for the number of distinct values for an index to become inaccurate with the potential of generating poor access plans. This problem has been fixed. It should be noted that the impact of this inaccuracy is not expected to be significant and that no action should be required. Although, recreating any given index will correct the inaccuracy. ================(Build #4345 - Engineering Case #339792)================ If the errormsg() function was executeded after a RAISERROR statement in a procedure, but before the procedure completed, the result of the function would have been null. This has been fixed. ================(Build #4346 - Engineering Case #339588)================ If a column default was an expression that contained the NEWID(*) function, the default value was calculated only once per statement. For example: create table T2 ( col1 int ); insert into T2 ( col1 ) values ( 1 ); insert into T2 ( col1 ) values ( 2 ); create table T1 ( id char(36) not null default uuidtostr(newid(*) primary key); insert into T1 ( col1 ) select col1 from T2; The last insert statement selects the two rows from table T2 and inserts them into table T1. The default value for column "id" would have been the same for both rows. Since column "id" is the primary key, a primary key violation would have been raised. This has been fixed. If the default expression is "uuidtostr(newid(*))", the default value is now calculated for every row separately. ================(Build #4346 - Engineering Case #339919)================ The server could have become deadlocked, causing it to appear hung, if a checkpoint or DDL statement occurred concurently with an update of the idle statistic, and the server was attempting to load a procedure. This is now fixed. ================(Build #4346 - Engineering Case #339931)================ If an ALTER PUBLICATION statement failed, e.g. a table being added was already part of the publication, then trigger definitions for any tables referenced since the database was started would have been disabled. The triggers would be restored by restarting the database or by executing a successful ALTER PUBLICATION. This has been fixed. ================(Build #4347 - Engineering Case #340293)================ The request level log may have shown "unknown" for some requests. This has been fixed ================(Build #4348 - Engineering Case #340542)================ When recovering a database that has been created before version 8.0.0, and the recovery failed with the error "Database cannot be started -- {log name} not expecting any operations in transaction log", the server would then have crashed. This has been fixed. ================(Build #4348 - Engineering Case #343705)================ The Histogram utility dbhist would have generated only "00,000" labels in the Excel Sheet if the Windows decimal separator under Regional Options was a comma. This has been fixed. ================(Build #4349 - Engineering Case #340419)================ It was possible to create userids, passwords and database encryption keys that could not be specified in a connection string. As well, it was possible to start servers with server and database names that could not be specified in a connection string. This has been fixed so that attempting to create a userid, password or database encryption key that is invalid, or attempting to start a server with an invalid server or database name, will fail with an error. Valid userids, passwords, database encryption keys, engine names and database aliases must NOT: - start with whitespace or single or double quotes - end with whitespace - contain semicolons ================(Build #4349 - Engineering Case #340672)================ If a CREATE PROCEDURE statement was executed, and the length of the user name and procedure name together exceed 150 bytes, the server would have crashed. This has been fixed. ================(Build #4349 - Engineering Case #340721)================ If a BACKUP DATABASE statement attempted to create an archive backup using a name longer than 255 bytes, the server would have crashed. This has now been fixed. ================(Build #4350 - Engineering Case #340916)================ Dynamic cache resizing did not work on AIX 5.x platforms. This has been corrected. ================(Build #4350 - Engineering Case #340963)================ Creating a database with an eight character mirror log name that was specified without an extension, such as 'dbinit foo.db -m foo45678', could have caused a server crash. This has been fixed. ================(Build #4351 - Engineering Case #340815)================ Remote Data Access could have caused a server crash, if a large data value was provided. This has been fixed. ================(Build #4352 - Engineering Case #340915)================ For read only queries, the server did not examine the definition of computed columns, which could have caused the server to omit some possible optimizations. For example: CREATE TABLE T(x int, y int compute(F(x))) -- F(x) is a User Defined Function SELECT x, F(x) from T for read only The above query can be executed as 'SELECT x, y from T' because y is a computed column whose value is pre-computed as F(x). The transformed query eliminates the need to compute F(x) for each value of x in T and, is therefore more efficient. The server now makes this transformation for read only queries. ================(Build #4352 - Engineering Case #340966)================ An error in common code dealing with string parameters to built-in functions could have caused a server crash. This has now been corrected. ================(Build #4352 - Engineering Case #341082)================ Creating a proxy table may have caused a server crash, if the server name in the location clause was very long. This has now been corrected. ================(Build #4352 - Engineering Case #341100)================ If a FORWARD TO statement was executed, and the server name specified in the statement was very long, there was a possibility it would have caused a server crash. This is now fixed. ================(Build #4352 - Engineering Case #341221)================ The ALTER DATABASE statement is documented, and the server correctly parses an ALTER DATABASE statement, but this feature was not implemented until 9.0.0. Now, an ALTER DATABASE statement will return the error "ALTER DATABASE NOT IMPLEMENTED", SQLSTATE 0A000 (SQLCODE -134). ================(Build #4353 - Engineering Case #263094)================ A user defined Java class could have been installed into a Java enabled database successfully, but would have been unusable due to the presence of a 'finally' block nested within another 'finally' block. This was due to the Java VM within the server not being able to verify the byte code of the user defined class, and therefore cannot being able to load it. Attempting to use the java class containing the nested 'finally' blocks would have resulted in the error message "{class name} is not a public Java class, and cannot be referenced from SQL". This has been fixed. The server VM can now verify byte code with nested 'finally' blocks. ================(Build #4353 - Engineering Case #340410)================ If an application was started from a very long directory specification (about 80 characters), connected to a database and then crashed or was killed, the server may also have crashed. This has been fixed. ================(Build #4353 - Engineering Case #341379)================ Creating a table with a unique constraint could have crashed the server, if the default constaint name was long. ================(Build #4354 - Engineering Case #341616)================ If the server ran out of memory, it could have crashed instead of reporting an error. On Windows CE, the server would have started without errors, but would not have accepted any connections if the system was low on memory. This has been fixed so that the server reports out of memory errors. ================(Build #4354 - Engineering Case #341633)================ Using a writefile could have lead to a corrupted database. That is the virtual database represented by the writefile plus original database would be corrupt, not the original database or the writefile itself. To cause the corruption, the server must have been started on the writefile, a virtual dbspace expanded, the server shutdown and restarted, then the virtual dbspace expanded again. The underlying original database must also have been created with 8.0.0 or later. This problem has now been fixed. ================(Build #4354 - Engineering Case #341648)================ Extracting into a new database would have resulted in a crash (if using dbxtract -an) or have caused Sybase Central to exit immediately without error, if there were no tables to be extracted. This has been fixed. ================(Build #4355 - Engineering Case #341761)================ If an application that connected to a server via shared memory, did not disconnect before closing, the message "Disconnecting shared memory client, process id not found" could have been displayed multiple times for a single connection in the server console. This problem was more likely to have occurred if all the server tasks were busy processing requests. This has been fixed so the message is only displayed once per connection. ================(Build #4355 - Engineering Case #341970)================ Starting a server, with two or more databases specified on the command line, could have caused the server to crash during start-up. This has been fixed. ================(Build #4356 - Engineering Case #342028)================ If a scheduled event is created without an ON or EVERY clause, it will be executed at most once, and the server will automatically delete the event definition after its scheduled time. If such an event was created in a database that did not have a user named DBA, the server would crash when it attempted to delete the event. Attempting to restart the database would cause another crash, as the server would again detect that the event should be deleted. This has been fixed. A server with this fix can be used to start a database that was otherwise unusable as a result of this problem. ================(Build #4356 - Engineering Case #342125)================ When creating a proxy procedure to a Microsoft SQL Server procedure, the creation of the proxy procedure would have failed if the version number of the procedure was included. For example, creating a proxy procedure to the procedure "rem_proc" will work, but creation would have failed when attempting to create a proxy procedure to the procedure "rem_proc;1". This problem was most likely to occur when using Sybase Central to create the proxy procedure. The problem has been fixed. ================(Build #4356 - Engineering Case #342134)================ If a CREATE TRIGGER statement included the clause ORDER 0, (this syntax is generated by PowerDesigner), to specify the order in which the trigger was to be fired relative to other triggers on the table, a syntax error would have been generated. This has been fixed. ================(Build #4356 - Engineering Case #342167)================ If a proxy procedure was created such that the owner was a user without DBA permission, then executing that proxy procedure could have resulted in a 'permission denied' error. Note that this only happened if the remote procedure returned a result set. This problem has been fixed. ================(Build #4358 - Engineering Case #339153)================ A FETCH INTO statement in a stored procedure, did not place fetched values into procedure variables if the ROW_UPDATED warning was returned, (this warning is returned for SCROLL cursors). This has now been corrected. Note, in 8.0.0 and above, some cursors are automatically converted to SCROLL cursors. For example because an updatable cursor is opened over a query with a sort. ================(Build #4358 - Engineering Case #339354)================ Calling the xp_sprintf system procedure could have caused a server crash. This is now fixed. ================(Build #4358 - Engineering Case #339768)================ Queries that use the MIN or MAX aggregate functions can have an optimization applied, if they satisfy certain conditions. In version 8.0.0 and later, these conditions were more restrictive than they were in previous versions. With this change, the set of conditions that queries must satisfy befor the MIN/MAX optimization will be applied has ben relaxed. Queries for which the MIN?MAX optimization is applied, must satisfy the following conditions: (1) the query block is of the form: select MIN(/MAX) (T.X) from T where some_condition - T is a base table and T.X is one of its columns - some_condition can be any type of predicate. This (2) the query block does not contain an ORDER BY clause, any DISTINCT aggregates, or a GROUP BY clause. (3) one of the following types of indexes must exist: - an index having the column T.X as a first column; or - an index having the column T.X as the n'th column, and for each i'th column with 0 < i < n , an equality predicate of the form "i'th column = constant" exists in the WHERE clause An example of some_condition would be: "T.A = 10 and T.B = 20 and ...". Then an index on columns T.A and T.B would qualify to be used for the MIN/MAX optimization. The MIN/MAX optimization tries to choose an index <idx> that returns rows ordered by T.X. During execution, only a limited number of rows are retrieved from the index until a qualifying row is found. The execution stops when this first qualifying row is retrieved. ================(Build #4358 - Engineering Case #341655)================ The graphical plans for queries containing temporary tables were being constructed incorrectly; any subtree containing a scan node over a temporary table would have been terminated at that point, with the scan node (sequential or index) for the temporary table also missing. This has been fixed. ================(Build #4358 - Engineering Case #342407)================ Inserting strings that were approximately 256 bytes in length, into a trie-based index, could have resulted in a corrupt index. Searching a trie-based index for strings that were approximately 256 bytes in length could have resulted in an incorrect result being returned. This has been fixed. ================(Build #4359 - Engineering Case #341887)================ It was possible for rows inserted by means of a wide insert to contain string values that were longer than the maximums allowed by the definition of the underlying columns. In other words, the server could have failed to truncate inserted column values, as necessary. These un-truncated values were inserted in both the database and the transaction log. Under normal circumstances, it was not likely that any problems with the database would have been noticed, as these values were properly truncated when they were read back later. However, the un-trancated values in the transaction log could have caused problems for utilities that needed to translate and/or replicate the operations from the transaction log. In order for the corruption to occur, a wide insert with the following characteristics must have occurred for one or more columns: - The column value in the first row must have been NULL, - A subsequent row must have contained a string value that did not exceed the maximum size allowed for the column, These must be then been followed at some point by a row containing a column value that needed to be truncated before insertion. This problem has now been fixed and a new server assertion ( number 100910 ) has been added to prevent this corruption from happening in the future. ================(Build #4360 - Engineering Case #342821)================ If an error occurred while the server was creating the system trigger for a foreign key with a referential action, the server could have crashed. This has now been fixed. ================(Build #4361 - Engineering Case #342538)================ After a fatal server error, attempting to stop a server with dbstop would not have stopped the server or would have displayed an error. Now, dbstop with the -y parameter, but without the -c parameter, will stop a server after a fatal error, as long as the server was started with the -gk command line option set to "all", (this is the default for the personal server). If the -y parameter is not used, dbstop will display the fatal error and prompt if the server should be stopped. ================(Build #4361 - Engineering Case #342900)================ When a cached plan was used in a stored procedure for an UPDATE or INSERT statement, columns marked as DEFAULT TIMESTAMP could have received a stale value from a previous invocation of the statement. This has been fixed. As a workaround, the database option Max_plans_cached can be set to 0 to get correct behaviour, although this may negatively impact performance. ================(Build #4362 - Engineering Case #339440)================ If a Java class running in the server's VM, sent a packet to an uninitialized port, any ports the class had initialized could have become disabled from receiving further messages. For example: - "java.net.DatagramSocket" is called to initialise a socket on port 3374 - "java.net.DatagramPacket" is called, sending a packet to this socket. This is received correctly - "java.net.DatagramPacket" is called again, sending a packet an uninitialized socket at 3370 - attempting to receive this packet fails as expected, with a "SocketException: Connection reset by peer" - "java.net.DatagramPacket" is called again to send a packet to the initialized socket at 3374 - attempting to receive this packet would have failed unexpectedly, with a "SocketException: Connection reset by peer" - all further attempts to receive packets sent to this socket will fail. This has now been fixed. Calls to receive packets sent to an uninitialized port will still fail, but these packets will no longer disable the socket from receiving packets on the initialized port. ================(Build #4362 - Engineering Case #343130)================ Expression caching is used to avoid re-computing the result of a user-defined function or a subquery within a query. If a function or subquery is evaluated with the identical parameters to a previous invocation, the cache is used to return the previous answer. Previously, the cache compared arguments for equality using the database comparison rules. For example, in a case-insensitive database, argument 'x' was compared equal to 'X'. This could lead to different answers than expected because the two strings are not identical. Now, arguments to the expression cache are only considered equal if they are identical. ================(Build #4363 - Engineering Case #342643)================ When unloading a database with a Multi-byte Character Set collation, using the Unload utility dbunload, if a database object, (such as a stored procedure, fuction etc) contained a MBCS character with 0x7b or 0x7d as a follow byte, the character would have been mangled. With 7-bit ASCII, the 0x7b and 0x7d correspond to brace characters. As well, if the opbject contained more than 100 such MBCS characters with 0x7b or 0x7d as follow-bytes, dbunload could have crashed. These problems have been fixed. ================(Build #4363 - Engineering Case #343308)================ If a query used a blob that was stored in a work table, which was then read from the work table and copied to another expression, and that expression was materialized into a block of rows in memory, then the server could have crashed or reported an assertion failure, when attempting to returning the blob value as part of the result set. For example, the following query could have generated the failure: create procedure P_Blob2( @x int ) begin select @x || repeat('long string',1000) x from rowgenerator where row_num = @x end select x, sum(row_num) from ( select row_num, DT.x from rowgenerator R, lateral( P_Blob2(R.row_num) ) DT union all select 1, '' ) DT2 group by x This has now been fixed. ================(Build #4363 - Engineering Case #343621)================ When certain collation names or IDs were passed to SORTKEY or COMPARE, the error 'Invalid parameter' would have been reported. These collations include 'turnocs', 'cyrnocs', 'rusnocs', and 'turnoac'. This has been fixed. ================(Build #4364 - Engineering Case #343152)================ If a "simple query", (see documentation for definition), referenced all primary key columns in its WHERE clause in a way that the result set could not have had more than one row, then the estimated row count could still have been greater than 1. This has been fixed. Note, estimated row counts are always return as negative numbers. ================(Build #4364 - Engineering Case #343603)================ A RESULT clause was added to the definition of a procedure when it was created, if the procedure called another procedure which returned a result set. This made it appear that the RESULT clause was specified explicitly by the creator, and affected how calls to the procedure were handled by dbisql and applications using ODBC. If multiple result sets were returned, the second and subsequent ones may have been missing columns. The RESULT clause is no longer added in this situation. ================(Build #4364 - Engineering Case #343618)================ A very long diagnostic message from a communication link could have caused the client or the server to have crashed. In order for this to have occurred, which would have been rare, the LOGFILE connection parameter or -z server option would have had to have been used. This is now fixed. ================(Build #4366 - Engineering Case #343155)================ A LOAD TABLE statement, executed as part of a stored procedure or an event, could have crashed the server when run a second time. This has been fixed. ================(Build #4366 - Engineering Case #343619)================ The error message text returned to the application after a server fatal error or assertion may have had "???" where it should have had details of what failed. This was always true on subsequent requests to the server after the fatal error occurred. This has been fixed so that details of the fatal error or assertion are now included in the error message text. ================(Build #4366 - Engineering Case #343683)================ It was possible for the server to fail with a "divide by zero" exception. The chances of this failure taking place were very small. The problem has now been resolved. ================(Build #4366 - Engineering Case #343815)================ If the expression for a COMPUTE or DEFAULT clause was very long, it could have resulted in a server crash. An error message is now given if the expression is longer than is supported by the server. The maximun expression length for a COMPUTE or DEFAULT clause is based on the database page size. It is approximately page_size - 64 bytes. ================(Build #4367 - Engineering Case #342927)================ Describing a column that appeared in both the GROUP BY clause and the null-supplying side of an outer join, may have incorrectly indicated that it is not nullable. For example, the following query was affected: select emp_id from employee key right outer join sales_order group by emp_id This has been fixed. ================(Build #4367 - Engineering Case #343380)================ The server runninmg on Windows NT, 2000, XP or 2003 could have hung, with 100% CPU on shutdown. The database file and server name were no longer in use by the hung server, so another server could have been started with the same name and on the same database. The hung server had to have been shutdown using the Task Manager. On machines where this hang occurred, it would have happened every time a server was shutdown. This problem has been fixed by adding a two second wait for the shutdown event. If this two second timeout is reached, the message "The TCP listener failed to shutdown cleanly within the timeout period" will appear in the server's output log, likely more than once and with more than one listener type (for example TCP and UDP). This problem occurred when the event which normally signals the listener thread to shutdown was lost, or intercepted by other software running on the machine. For personal servers using only shared memory connections, a workaround to this lost event problem is to use the -x none option. ================(Build #4367 - Engineering Case #343820)================ If a subselect that had no outer references, or a non-deterministic function that had no non-constant parameters, was used below a work table and in a prefilter above the work table, as shown in the graphical plan, then the server could have crashed or returned the wrong answer. For example,the following query shows the problem on the asademo database if the JHO join method is selected: select ( select '12' from dummy D1, dummy D2 ) SubQ1, ( select '13' from dummy D3, dummy D4 where SubQ1 > 10 ) SubQ2 from rowgenerator R1 left outer join employee E on R1.row_num = E.salary where (R1.row_num between SubQ1 and 255,100) and SubQ2 = '13' This problem has now been fixed. ================(Build #4367 - Engineering Case #344019)================ Cancelling a CREATE DATABASE or DROP DATABASE statement, could have caused the server to hang, if the cancel occurred concurrently with the cache shrinking. This has been fixed. ================(Build #4368 - Engineering Case #344159)================ A hash join with an IF or a CASE expression with a predicate used in a join condition could have caused a request to fail with the error: "Run time SQL error -- *** ERROR *** Assertion failed: 102501 (10.0.0.1267) Work table: NULL value inserted into not-NULL column (SQLCODE: -300; SQLSTATE: 40000)" This also affected INTERSECT implemented with hash join. This problem has been fixed. ================(Build #4368 - Engineering Case #344347)================ Creating a view with a deeply nested structure (e.g. a large number of UNIONs) could have caused the server to crash. These types of queries will now return the error -890 "Statement size or complexity exceeds server limits". A work-around is to increase the size of the server's stack using the -gs or -gss commandline options. ================(Build #4369 - Engineering Case #343687)================ An attempt to create column statistics on a server running on a multi-CPU machine, could have caused a server crash if the statistics being generated were also being used by other concurrently running queries. The chance of the crash occurring was proportional to the amount of concurrent access to column statistics taking place. This problem has been resolved. ================(Build #4370 - Engineering Case #344417)================ If a successful database connection is terminated without first doing a database disconnect, a "connection terminated abnormally" warning message is displayed in the server console. Common reasons for this condition to occur include the application was terminated, the application crashed, or the application ended without correctly closing the connection.ÿ If an ESQL app did a db_string_connect or EXEC SQL CONNECT but did not do a db_string_disconnect or an ESQL SQL DISCONNECT, this warning would have occurred. Similarly if an ODBC application did a SQLConnect or SQLDriverConnect without doing a SQLDisconnect this warning would have occurred. If the connection was a TCP/IP or an SPX connection and the client end of the connection was closed without first disconnecting, and -z wasn't used, the server would have displayed the message "Connection terminated abnormally; SERVER socket shut down" in the console. This has been fixed so that it displays "Connection terminated abnormally; client socket shut down." ================(Build #4370 - Engineering Case #344440)================ If multiple concurrent connections were made to a database that had just been started (e.g., multiple connections autostart the same database), then it was possible for the server to crash. Although the probably of the crash taking place was extremely low. The problem has now been resolved. ================(Build #4371 - Engineering Case #344643)================ Executing a DROP STATISTICS statement with the database option Blocking = 'OFF', that failed because the table being modified was under use by another connection, could have caused the server to crash. This problem has been fixed. ================(Build #4372 - Engineering Case #343567)================ A recurring scheduled event could have failed to fire at each of the times specified by its schedule. The interval between scheduled executions needed to exceed one hour for this problem to appear. For servers prior to 8.0.2 build 4335 or 9.0.0 build 1232, the interval needed to exceed one day for the problem to occur. The problem was also dependent upon whether or not the server was restarted between event executions. This has now been fixed. ================(Build #4373 - Engineering Case #344861)================ When run on Mac OS X, HP-UX and Compaq Tru64 platforms, the server was not listening to the correct UDP ports, which could have caused applications to fail to find the server when attempting to connect. The server listens to UDP ports and responds to requests on these ports so that applications can locate the server by server name, even if the server starts on a TCP/IP port other than the default port (2638). Since Mac OS X, HP-UX, and Compaq Tru64 platforms do not allow multiple processes to bind to the same UDP port, connections to server running on these platforms, must specify the TCP/IP port number (via ServerPort) if the server is not using the default TCP/IP port (2638). If the server's TCP/IP port number is 2638 (the default), the server listens to UDP port 2638, otherwise the server should listen to the same UDP port as the TCP/IP port. For the Mac OS X, HP-UX, and Compaq Tru64 platforms, the server should NOT listen to UDP port 2638, even though servers on other platforms do additionally listen to UDP port 2638. The reason servers on these platforms should not listen to UDP port 2638 is if a second server starts on TCP/IP port 2638, the UDP port 2638 must remain available for the second server. Note that in order to connect over TCP/IP to a server using a TCP/IP port other than 2638 running on the Mac OS X, HP-UX or Compaq Tru64 platforms, the client must specify the port of the server. For example, if the server is started with the command "dbsrv8 -n MyASAServer asademo.db", a client on the same subnet can find the server using the connection parameters "eng=MyASAServer;links=tcpip". If the server is started on Mac OS X, HP-UX or Compaq Tru64 with the command "dbsrv8 -n SecondASAServer -x tcpip(port=7777) asademo.db", a client on the same subnet can find the server using the connection parameters "eng=SecondASAServer;links=tcpip(port=7777)". Note that if the server was running on a different platform, then the client would not need to specify the port TCP/IP parameter. Additionally, on Mac OS X, HP-UX and Compaq Tru64 platforms, if a server was already using port 2638, and a second network server was started without the ServerPort parameter, this second network server should fail to start. Before this change the second network server would have chosen a different port and started. The reason the network server should fail to start in this case is so that user can specify the server's port number which all clients must also specify (if the server were allowed to start, the port number could change if the second server was restarted, causing clients to fail to connect in the future). Note that personal servers will start even if port 2638 is in use, since shared memory is normally used to connect to personal servers. This has been fixed so that on Mac OS X, HP-UX and Compaq Tru64, servers listen to the correct UDP ports, and network servers fail to start if TCP/IP port 2638 is in use and no port is specified. ================(Build #4374 - Engineering Case #345223)================ If a procedure, trigger or view was created with redundant quotes around the object name and the next token started immediately after the trailing quote, the saved source for the object would have contained no separation between the object name and the next token. For example: create procedure "p"as begin return end would have been saved as: create procedure pas begin return end This has been fixed. ================(Build #4374 - Engineering Case #347068)================ If a keyset-driven cursor was used, or a keyset was used to compute an UPDATE, INSERT, or DELETE, then NULL could be returned incorrectly for columns returned by the keyset. This is now fixed. Note, this problem was introduced in 8.0.2 build 4368. ================(Build #4375 - Engineering Case #344414)================ Executing a SQL statement containing a string that was larger than the page size of the database, could have caused the server to crash. This problem has now been corrected. ================(Build #4376 - Engineering Case #345174)================ Complex expressions used in DISTINCT and ORDER BY clauses were not correctly matched, resulting in the syntax error -152 "Invalid order by specification". This has now been fixed. As a general rule, for query blocks using both ORDER BY and DISTINCT clauses, the ORDER BY expressions must reference only the expressions from the select list with DISTINCT clause. For example: select distinct emp_lname, isnull (city, ' ') as address from employee order by upper(address) ================(Build #4376 - Engineering Case #345185)================ If the system procedure sa_validate, was called in unchained mode (ie the database option CHAINED='off'), then no information is returned. This problem was most noticeable when using a jConnect or Open Client application. This was due to the local temporary table declared in sa_validate to hold the results, did not have the ON COMMIT PRESERVE ROWS clause. This problem has now been fixed for newly created databases. To correct this problem for existing databases, modify the sa_validate procedure so that the temporary table result_msgs, has the clause ON COMMIT PRESERVE ROWS. ================(Build #4376 - Engineering Case #345571)================ In very rare situations, the server could have hung when stopping a database. ================(Build #4378 - Engineering Case #345558)================ If an UPDATE statement included an assignment to a local variable and the value being assigned was not of the same type as the variable, a server crash could have resulted. This has been fixed. ================(Build #4378 - Engineering Case #346037)================ If a RAISERROR statement was executed in a procedure and a subsequent statement in the procedure caused a trigger to fire, an error would have been generated when the trigger completed. This would have prevented the statement which fired the trigger from completing successfully, and might have prevented the remainder of the procedure from executing. This has been fixed. Note that a RAISERROR executed inside a trigger will still cause the triggering statement to fail. ================(Build #4378 - Engineering Case #346145)================ The server allowed, in rare circumstances, a database user with limited permissions to manage to exceed those permissions. This is now fixed. ================(Build #4379 - Engineering Case #344946)================ Large or complicated statements could have caused the server to crash with a stack overflow error, or to return a fatal error "memory exhausted". Both situations would have lead to the server failing to respond to further requests. For example, a statement of the following form could have caused the problem: select 1 + (1+1+...+1) -- 10,000 '1' literals in the expression + ... + (1+1+...+1) -- above parenthesized expression repeated 11 or more times, depending on cache size Requests could also fail with error -890 - "Statement size or complexity exceeds server limits", if the main heap grew to be near <maximum cache size>/<number of workers>. These problems have now been fixed. ================(Build #4380 - Engineering Case #345734)================ If a predicate qualified to be pushed into a view, then the process of inferring new predicates in the view query block, might not have used this pushed predicate. This may have resulted in less than optimal access plans, due to the fact that useful sargable predicates were not inferred. This has been fixed. The following conditions must have been met for a query to have exhibited this problem: (1) the main query block was a grouped query on a view V1 (2) the main query block contained a local view predicate on V1 (e.g., "V1.col1 = constant") (3) the view V1 contained other predicates that, with the help of the pushed predicate, could have been used to infer sargable predicates on base tables (e.g., "col1 = T.x") (4) the view V1 was grouped as well Example: select V1.col2, count(*) from V1 where V1.col1 = c group by V1.col2 V1: select V2.col3, count(*) from V2, T where V2.col1 = T.x group by V2.col3 V2: select * form R1 UNION ALL select * from R2 ================(Build #4380 - Engineering Case #345761)================ If a multi-variable SELECT ... INTO was executed in a procedure and the query returned no rows, calling the procedure simultaneously from several connections could have caused the server to crash. For this to have occurred, the SELECT statement must have been followed by another statement involving a query or expression. The problem was unlikely to occur on single-processor machines. This has been fixed. ================(Build #4380 - Engineering Case #346507)================ In databases using 1253ELL (Greek) collation, identifiers containing Greek letters required double-quotes because the Greek letters were not properly identified as alphabetic. This has been corrected, so that Greek letters can now be used without quotes. ================(Build #4380 - Engineering Case #346517)================ When generating values for AUTOINCREMENT columns, if the next available value was out of range, the server's behavior varied based on the datatype of the column. For SMALLINT columns, a "value out of range for destination" was reported. For INT and BIGINT columns, a negative value was generated. For UNSIGNED INT, the value would wrap to 0. For UNSIGNED BIGINT values, the value could wrap past the maximum signed bigint. The server's behaviour is now consistant, it generates a NULL value for an AUTOINCREMENT column if the next available value is out of range for the column. ================(Build #4381 - Engineering Case #344838)================ Performance of the 8.0.2 server when run on Solaris 9 or 10 machines, was poor compared to the server running on Solaris 6, 7 or 8, especially with large databases. The problem was due to dynamic cache sizing not being enabled for servers running on Solaris 9 or 10, thus the server never grew the cache to accomodate large databases. This has now been fixed, dynamic cache sizing is now enabled when the server is run on Solaris 9 or 10. A work around is to start the server with a sufficiently large cache. ================(Build #4381 - Engineering Case #346632)================ If a statement-level trigger was defined for multiple trigger events, which included DELETE, the "inserted" temporary table available within the trigger would have been populated when a DELETE on the table was performed. Now, the "inserted" temporary table is empty in this case. ================(Build #4381 - Engineering Case #346715)================ If a Watcom-SQL stored procedure or trigger containes a statement like: execute var; a syntax error should be reported, but was not. Instead, when the procedure or trigger was executed, the message "Invalid prepared statement type" was reported. A syntax error will now be given when the procedure or trigger is created. If the intent of the original statement was to treat the contents of the string variable "var" as a statement to be executed, EXECUTE IMMEDIATE must be used instead. ================(Build #4382 - Engineering Case #345855)================ A message statement with a comma-separated list of expressions, could have caused a server crash, (ASA 8.0.x) or a syntax error, (ASA 9.0.x), if the first expression did not contain a table reference and a subsequent expression did contain a table reference. For example: message 'Version: ',string(( select @@version )) This has been fixed. ================(Build #4382 - Engineering Case #346348)================ ODBC applications running on Compaq Tru64 platforms, using the ODBC driver from version 8.0.2 build 4122 or later, would have hung or crashed. A change was made to the ODBC driver that required recompilation of ODBC applications, but updated header files (in particular odbc.h) were not included. New headers are now included and 64 bit ODBC applications will need to be recompiled. ================(Build #4383 - Engineering Case #346245)================ Selecting blob data from a variable could have caused the server to stop with an assertion failure. This has been resolved. ================(Build #4383 - Engineering Case #346604)================ Calling the system procedure sa_locks, could have caused a deadlock in the server. This problem was more likely to occur on multiprocessor and unix systems. ================(Build #4383 - Engineering Case #346766)================ The server could have faulted with an integer divide by zero error, when executing a memory intensive query that causes the cache to grow dynamically to the maximum allowed. This is now fixed, but a work around would be to disable dynamic cache sizing (i.e. specifying -ca 0 on the command line). ================(Build #4384 - Engineering Case #346991)================ Assigning the result of a string concatenation to a variable could have caused the size limit of the variable to be exceeded. This would only have occurred with the bar ( || ) operator. This is now fixed, the concatenated string is truncated to the maximum size. ================(Build #4385 - Engineering Case #328695)================ For ADO applications using client-side cursors, when adding a record to a table containing a char or varchar column, using an ADO recordset, the value in the ADO recordset was padded with blank spaces up to the maximum length of the column. This padding behavior occurred as soon as the assignment took place (well before the new record was transmitted to the database). This has been fixed. Previously, the DBCOLUMNFLAGS field of the DBCOLUMNINFO structure for char and varchar columns included DBCOLUMNFLAGS_ISFIXEDLENGTH. This was incorrect. This flag is no longer set for char and varchar columns. ================(Build #4386 - Engineering Case #347493)================ The server could have crashed on startup, if a large number of tasks were specified, and they could not all be created due to lack of memory. This problem was more likely to occur on Windows platforms using AWE, with 8.0.2 build 4076, or later. This has been fixed in the Windows server, (a fix for NetWare and Unix servers to follow), now it will fail with an error indicative of excessive memory usage. ================(Build #4388 - Engineering Case #347538)================ Running a querey at isolation level 1 could have taken significantly longer than at isolation level 0. This was particularly evident when the plan called for repeatedly re-reading the same set of rows. This was due to the cost of obtaining the short term locks for cursor stability and checking the long term lock table for conflicting locks. The time to aquire the cursor stability locks has been reduced by optimizing lookups into the long term lock table. ================(Build #4388 - Engineering Case #347591)================ The result of: select convert(long varchar,current date,13) would have returned a string based on the Date_format option, rather than the format represented by the parameter 13. This has been fixed. ================(Build #4388 - Engineering Case #347825)================ If LOAD TABLE was executed on a Global Temporary table, an exclusive lock was left on the table until a COMMIT was executed. Other connections attempting to reference the table for the first time would block until the lock was released. LOAD TABLE will now execute a COMMIT at the end of the statement in this situation, releasing the lock. If a Global Temporary table was created with ON COMMIT DELETE ROWS, an error will be given on an attempt to use LOAD TABLE with that table. ================(Build #4389 - Engineering Case #346886)================ If a query contained an expression in the select list using the built-in finction NUMBER(*), (such as NUMBER(*)+1000) or a non-deterministic function, then a wrong answer could have been returned if the query also contained an EXISTS style predicate (or ANY, ALL or IN), where the predicate was re-written as a join with a DISTINCT operation. The wrong answer could have contained more rows than expected or an incorrect value for the expression derived from the NUMBER(*) or a non-deterministic function. For example, the following query demonstrates the problem, depending on the plan selected by the query optimizer: select R1.row_num, rand(), number(*)+100 from rowgenerator R1 where exists ( select * from rowgenerator R2 where R2.row_num <> R1.row_num and R2.row_num <= 2) This problem has been fixed. ================(Build #4389 - Engineering Case #347045)================ Queries containing a full outer join and an IS NULL predicate may have returned incorrect results. For this to have occurred, all of the following conditions must have been true: - the query contained a full outer join above another outer join (potentially with other joins in between). - the WHERE clause must have been a conjunction containing a predicate, or a single predicate, of the form "expr IS NULL" where expr was a simple expression involving a single base column. - the affected lower outer join must have been an ON clause of the exact form column=column, where one of the columns involved in the predicate was in the IS NULL expression. For example: SELECT * FROM TAB1 LEFT OUTER JOIN TAB2 ON TAB1.COL2 = TAB2.COL2 FULL OUTER JOIN TAB3 ON TAB2.COL3 = TAB3.COL3 WHERE TAB1.COL2 IS NULL This has now been fixed. A workaround is to rewrite the query so that it does not meet all of the listed conditions. ================(Build #4389 - Engineering Case #348353)================ If an ALTER TABLE statement was used to rename a column and the column was referenced in the column list of an UPDATE OF trigger, or was part of a foreign key defined with an ON UPDATE action, the server could have crashed or reported an assertion failure. The crash or assertion failure could have occurred after deleting the primary key for the table. Now, an error will be given when attempting to rename the column. ================(Build #4389 - Engineering Case #348469)================ If a request log that contained statements executed by a Java application, was analyzed by the system procedure sa_get_request_times, any host variable values recorded in the log would have been missing from satmp_request_hostvar. Also, the last character of the host variable value would have been truncated. This has been fixed. ================(Build #4389 - Engineering Case #348517)================ Dropping a declared temporary table was not permitted if the database was running in read-only mode. This operation is now allowed. ================(Build #4391 - Engineering Case #340743)================ If a LOAD TABLE statement was executed on a global temporary table, an exclusive lock was left on the table until a COMMIT was executed. Other connections attempting to reference the table for the first time would have been blocked until the lock was released. Now, executing a LOAD TABLE statement will cause a COMMIT to be executed at the end of the statement, releasing the lock. If a global temporary table was created with ON COMMIT DELETE ROWS, an error will be given on an attempt to use LOAD TABLE with that table. ================(Build #4391 - Engineering Case #348512)================ When connected to the utility database, (utility_db), executing a SET OPTION statement would have caused the next statement to fail with a "Connection error". This has been fixed. SET OPTION statements will now return an error, as they are not supported when connected to the utility_db. Subsequent statements will work as expected. ================(Build #4391 - Engineering Case #348751)================ If the server had multiple, memory intensive transactions running concurrently, it may have erroneously failed with an 'out of memory' error'. This would only have occurred on multiprocessor systems. This has been fixed. ================(Build #4391 - Engineering Case #348922)================ If a transaction was active when a BACKUP DATABASE statement was executed, and the transaction subsequently rolled back, changes made by the transaction prior to the start of the backup would not have been rolled back in the backed up database. The contents of the transaction log would have been backed up correctly, and this log could have been applied to an earlier copy of the database to produce the correct results. This problem only occurred on databases created with versions 8.0.0 or later, and does not affect client-side backups created with DBBACKUP. Now, uncommitted transactions will be rolled back correctly in backed up databases. ================(Build #4391 - Engineering Case #350836)================ If a LOAD TABLE statement was executed on a Global Temporary table, an exclusive lock was left on the table until a COMMIT was executed. Other connections attempting to reference the table would have been blocked until the lock was released. This lock is unnecessary, so now, executing a LOAD TABLE statement on a Global Temporary table no longer aquires an exclusive lock. ================(Build #4392 - Engineering Case #349073)================ If any of the statements listed below did not qualify a table name with an owner, then it was not possible to translate the transaction log and re-execute the generated statements using a different userid than that used to execute the original statements. CREATE/ALTER VIEW -- affected tables referenced in the view's query CREATE INDEX ALTER TABLE TRUNCATE TABLE GRANT REVOKE DROP VIEW LOAD TABLE Now, these statements recorded in the transaction log will now have the table name qualified with its owner name. ================(Build #4393 - Engineering Case #346750)================ If a Remote Data Access query involved proxy tables on multiple servers and used host variables, then the query may have failed with a "Not enough values for host variables" error. This problem has now been fixed. ================(Build #4393 - Engineering Case #349326)================ The active procedure context could have been lost if an EXECUTE IMMEDIATE executed a batch, perhaps by a calling another procedure. One symptom of this would be that the global variable @@procid would be 0. This has now been fixed. ================(Build #4394 - Engineering Case #349922)================ The changes for Engineering Case #347493, where a server crash upon startup if a large number of tasks were specified, and they could not all be created due to lack of memory, has been ported to the NetWare and Unix servers. The server will now fail with an error indicative of excessive memory usage. ================(Build #4395 - Engineering Case #347481)================ For queries with multiple predicates in the WHERE clause, if one predicate had a very small selectivity, the server could have picked an inefficient plan by choosing an inferior index. This has now been fixed. ================(Build #4395 - Engineering Case #349450)================ After recovering a database which used no transaction log file, shutting down the server before modifying the database could have caused assertion failures 201810 "Checkpoint log: the database is not clean during truncate" or 201117 "Attempt to close a file marked as dirty". If the server was killed or the machine or server crashed before the database was modified, then subsequently checkpointed, the database could have been corrupt. Only databases created with 8.0.0 or later are affected. This problem has now been corrected. ================(Build #4395 - Engineering Case #349915)================ A query, where both join elimination and subquery flattening took place, may have returned too few rows. For example: select emp_id from employee where emp_id in (select distinct sales_rep from sales_order key join sales_order_items) for read only This has now been fixed. Note that this will not happen for updateable queries, since join elimination cannot take place in that case. Cases where it may happen include, "for read only" queries and "insert into ... select ..." queries. A workaround is to prevent join elimination either by specifying "for update", or by using additional columns from the eliminated table in a way that doesn't change the result. For example: select emp_id + (manager_id-manager_id) from employee where emp_id in (select distinct sales_rep from sales_order key join sales_order_items) for read only ================(Build #4395 - Engineering Case #349954)================ A new connection could have been refused, in very rare timing dependent cases, when it should have been allowed. In order for this to have occurred the network server must have been at its maximum number of licensed clients (Note, each unique client address from a remote machine counts as one license), and the last connection from a client machine must have been disconnecting at the same time a new connection was being made at the same client machine This has been fixed so that the server calculates licenses used accurately. ================(Build #4396 - Engineering Case #350058)================ When run on Windows 95, 98, ME or NetWare, the server could have crashed when receiving BLOBs over TCP/IP or SPX connections. The probability of this crash was a very slight and timing dependent. This has now been fixed. ================(Build #4399 - Engineering Case #351110)================ This change fixes three problems of a similar nature to that addressed by Engineering Case 344946. Attempts to execute a statement that contained an IN list with too many elements would have lead to the following assertion failure: 104010, "Internal vector size too large" This was due to an IN list optimization that was failing. The maximum number of IN-list elements was limited by database page size. Now, IN-list size is limited by cache size. However, if an IN list is larger than the above limit, the IN-list optimization will not be used, which may impact performance, but the statement will not fail. Attempts to execute a statement that referred to too many tables could have lead the to following assertion failure: 101504, "Memory allocation size too large" The maximum number of tables is limited by database page size. Attempts to execute a large statement could have lead to the assertion failure: 101503, "Heap index (%d) and heap header page counts (%d) disagree" if the size of the associated heap was larger than 2^16 pages. ================(Build #4400 - Engineering Case #349467)================ The following message: unaligned access to x, ip=y was being displayed in the system log when the server, or one of the database utilities, was used, where x and y were some hex values. These messages would not have caused any execution correctness problems, but may have degraded performance slightly. This has been fixed. ================(Build #4400 - Engineering Case #349901)================ The server would have crashed during execution of a query that used an index, if all of the following conditions were true: - the index was a compressed B-tree index - the index contained a character or binary key column - the length of the search value for this key column was almost the page size, or was longer - the search value for this key column was not a constant This has now been fixed. ================(Build #4401 - Engineering Case #350530)================ If a mirror log existed, then running the Database Backup utility dbbackup, with the -x (delete and restart the transaction log) command line option, would have failed to delete the renamed mirror log file created during the backup process. This has now been fixed. ================(Build #4402 - Engineering Case #351130)================ Calling the trim() function on a string consisting only of whitespace, with a length of less than approximately 30 characters. (The actual length required was platform dependent) could have caused the server to crash. This has now been fixed. ================(Build #4404 - Engineering Case #349359)================ When determining the broadcast address to use, the server was using the IP address of the host and ignoring the subnet mask, which was resulting in an incorrect broadcast address. This meant that client applications that used broadcasts to find servers may have failed to find them, and similarily, servers may have fail to find existing servers with the same name. This has now been fixed. ================(Build #4404 - Engineering Case #351603)================ In very rare circumstances, the server could have crashed with ambiguous symptoms during query execution. The cause of the crash was likely to have been memory corruption. This problem has now been fixed. ================(Build #4407 - Engineering Case #352275)================ If an application exceeded the limit for prepared statements set by the database option Max_statement_count, but ignored the error returned in this situtation, it could eventually have caused the server to run out of memory. The temporary file would also have grown for each statement prepared. This has been fixed. ================(Build #4407 - Engineering Case #352471)================ When the server was run on multi-processor Windows plarforms, tasks for connections where the database option Background_priority was set to 'On', would have been scheduled by the OS such that only one was running at a time, even if other processors were idle. This has been corrected. ================(Build #4408 - Engineering Case #352047)================ If the "Disconnect" User Event was enabled and a connection autostarted a database, and used the connection parameter Autostop=yes, the database may not have been shutdown after the last disconnect. This has been fixed. ================(Build #4409 - Engineering Case #348610)================ Committing a transaction that deleted rows containing blobs, whose aggregate size was larger than the current cache size, could have taken a very long time. The time to do these deletes has been reducedsignificantly. As well, blob columns created by servers containing this change, can be deleted even more efficiently. ================(Build #4410 - Engineering Case #353026)================ Calling the system procedure "sa_get_request_times", could have caused a server crash. This has now been fixed. ================(Build #4412 - Engineering Case #353334)================ Calling the system extended procedures xp_scanf, xp_sprintf or xp_startsmtp could, in very rare circumstances, have caused the server to crash. These procedures have now been fixed. ================(Build #4412 - Engineering Case #353430)================ If the transaction log was renamed while one or more connections had open transactions, the log offset of the oldest incomplete transaction could have been recorded incorrectly. This might have prevented the MobiLink client dbmlsync from deleting out-of-date transaction logs. This has been fixed. ================(Build #4414 - Engineering Case #353336)================ If connections were being made concurrently which required a server to be autostarted, in rare timing dependent cases, the server could have crashed. This has now been fixed. ================(Build #4416 - Engineering Case #353753)================ Running the Validation utility dbvalid to validate a read-only database would have caused the error: A write failed with error code: (5), Access is denied. Fatal error: Unknown device error This has been fixed. ================(Build #4416 - Engineering Case #353913)================ The second and subsequent connections over SPX would not have used PORT connection parameters. PORT options were only read when the port was created, and ignored at all other times, which caused problems with subsequent connections that want to use different options. For example: connect using 'con=a;eng=g1;links=spx(dobroadcast=NO;host=host1)' connect using 'con=b;eng=g2;links=spx(dobroadcast=NO;host=host2)' If done from the same application, the second connect would not have worked, as the PORT options would have been ignored, so host2 would not have been looked at. This has now been fixed. ================(Build #4419 - Engineering Case #354116)================ If two transactions perform concurrent operations that involve scanning the table sequentially, and the table contains more than 100 pages of data, there was a chance of database corruption. One of the operations must have been an insert or update, while the other must have performed a sequential scan of the table. Indexed access in conjunction with inserts/updates would not have triggered the problem. This was more likely to occur on multiprocessor and Unix systems [while still possible, it was unlikely to occur on single processor Windows systems]. ================(Build #4419 - Engineering Case #354773)================ If an external procedure attempted to return a string longer than 65535 bytes, via a single call to the set_value callback function, the string would have been truncated. This has been fixed. A workaround is to call set_value multiple times to build up the result in pieces, each being shorter than 65535. ================(Build #4420 - Engineering Case #354096)================ The server would go into an infinite loop, with nearly 100 percent cpu usage, when executing a query like the following: select (select systable.first_page from systable where systable.table_id = 1) as id0, id0 as id1 from syscolumn group by id1 The problem occurred under the following conditions: - the query had a subselect in the select list or in the WHERE clause - the subquery had an alias name ("id0" in the above query) and the alias name was aliased by a second alias name ("id0 as id1" see above), so that both alias names were syntaxtically identical - the second alias name was part of a GROUP BY element This problem has been fixed ================(Build #4420 - Engineering Case #354381)================ When running on Windows 2003, the server could have crashed on startup, if the machine had no TCP/IP address, or was unplugged from the network. This has been fixed. ================(Build #4420 - Engineering Case #354948)================ When the database option Optimization_goal was set to 'First-row', the optimizer did not always respect it for queries with equijoins. This has been fixed. ================(Build #4421 - Engineering Case #353678)================ If either of the -ar or -an command line options was used with Unload utility DBUNLOAD, column statistics from the unloaded database would not have been preserved in the new database. This could have resulted in different query execution plans being chosen when using the new database. This has been fixed. ================(Build #4421 - Engineering Case #355245)================ Attempting to unload a database created prior to SQL Anywhere version 5 would have resulted in an error that user "dbo" did not exist. If the dbo user was created, a different error would have been given, since the view dbo.sysusers would not have existed. This has been fixed. A workaround is to run the Upgrade utility dbupgrad before unloading the database. ================(Build #4421 - Engineering Case #355299)================ When the server ran databases created with ASA versions 4.x and earlier (or databases upgraded from ASA versions 4.x and earlier), queries that made use of index scans over fully hashed indexes could have returned incorrect results. An optimization for index scans in older databases was incorrect. This optimization has now been removed, so a drop in performance when using older databases will likely be noticed. An unload/reload is recommended if the resulting performance is not acceptable. ================(Build #4422 - Engineering Case #355459)================ When sending or receiving multi-piece strings on a heavily loaded system, the server could have deadlocked, causing a hang. This has been fixed. A work around would be to increase the number of tasks available to service requests (-gn). Alternatively, a dba user could use a pre-existing connection with the DEDICATED_TASK option set, to manually break the deadlock by cancelling one or more executing requests. ================(Build #4423 - Engineering Case #353893)================ If an event was scheduled to execute only once, and the event completed at the same time as the database was shut down, a server crash could have resulted. This has been fixed. ================(Build #4423 - Engineering Case #355831)================ Executing an ALTER TABLE statement which attempted to modify a column and then drop the column in the same statement would have caused the server to crash. Attempting to modify and drop a column in the same ALTER TABLE statement will now generate the error "ALTER clause conflict". These changes must be made with separate ALTER TABLE statements. ================(Build #4423 - Engineering Case #355965)================ When run on SMP systems using processors from Intel's P6 family, (as well as Pentium 4 and XEON), the server could have hung when receiving multi-piece strings via shared memory connections. This problem also affected ODBC, OLEDB and Embedded SQL clients as well. It has been fixed. ================(Build #4425 - Engineering Case #355527)================ If a server goes down dirty (eg. due to a power failure), there can be a partial operation at the end of the log. If such a log was applied to a database by using the -a (apply named transaction log file) server command line option, restarting the server using that database and log file (without -a) could have caused the server to fail to start with the message "not expecting any operations in transaction log". The problem would only have occurred if the incomplete operation was the first operation of a new transaction and there were no other transactions active after all complete operations had been applied. The problem has been fixed by removing the partial operation from the log after the log is applied (or recovery is completed). ================(Build #4426 - Engineering Case #352793)================ If the database option Truncate_date_values was set to OFF before populating a row containing a DATE column with a value including both date and time, and the Truncate_date_values option was subsequently set back to its default of ON, updating the row in any way which caused the row to be moved to another page, would have resulted in an assertion failure 105400. This has been fixed. A workaround is to set the option to OFF, manually update any DATE values to eliminate the time component, then set the option to ON. A statement such as the following could be used: update t set datecol = date(datecol) where datepart(hour,datecol)<>0 or datepart(minute,datecol)<>0 Normally this option should be left at its default setting. ================(Build #4426 - Engineering Case #356795)================ On Windows 95, 98 or ME, if a network server had both TCP/IP and SPX connections, the server could have hung with 100% CPU usage. This has been fixed. Note if using a network server, Windows NT, 2000, XP or 2003 are recommended over Windows 95, 98 or ME, to ensure better performance and reliability. ================(Build #4428 - Engineering Case #356595)================ If a RAISERROR or PRINT statement containted a subselect in the format string or in a PRINT expresstion, the server may have crashed or returned an error. This has been fixed. ================(Build #4429 - Engineering Case #355098)================ An ALTER TABLE statement that added, modified or deleted a table's CHECK constraint, a column's CHECK constraint or renamed a column, had no effect on INSERT, UPDATE or DELETE statements inside stored procedures and triggers, if the procedure or trigger was executed at least once prior to the ALTER TABLE statement. This problem has been fixed. ================(Build #4431 - Engineering Case #356762)================ A non-fatal assertion failure: 105200 "Unexpected error locking row during fetch" could have been reported when executing an outer join with a temporary table on the null-supplying side of an outer join. This would have appeared to an application as error -300 "Run time SQL error" or -853 "Cursor not in a valid state". This has now been fixed. ================(Build #4432 - Engineering Case #355012)================ Calling any of the external mail routines (such as xp_sendmail or xp_startmail) could have caused the server to crash. A problem with passing NULL parameters has been fixed. ================(Build #4432 - Engineering Case #357689)================ A row limit (ie 'FIRST' or 'TOP nnn') could have been ignored on DELETE and UPDATE statements. This was most likely to occur on smaller tables and for very simple statements. Example: create table temp1 (nID int not null); insert into temp1 (nID, nid2) values (1); insert into temp1 (nID, nid2) values (1); commit; delete first from temp1; //deletes both rows This problem has been corrected. A workaround is to attach a redundant ORDER BY clause to the statement. delete first from temp1 order by 1+1; //deletes just one row ================(Build #4432 - Engineering Case #357694)================ When run on NetWare systems, the server could have caused a 'CPU Hog' abend executing a complex query. This has been fixed by adding additional yields in the optimizer. ================(Build #4433 - Engineering Case #351001)================ On CE devoces, queries could have failed with the error "Dynamic memory exhausted", if a Join Hash operator was used in an access plan and the server cache size was too small. This has been fixed by disabling the Join Hash operator for CE devices during optimization if the available cache has less than 2000 pages. Thus resulting in access plans that do not contain such joins. ================(Build #4433 - Engineering Case #357306)================ The server could have chosen an inefficient execution plan for a query, even after freshly creating statistics for all tables involved in the query. The poor plan was usually caused by poor join selectivity estimation. Now, the server will have more information available after a CREATE STSTISTICS is executed, which should improve the quality of plans chosen. ================(Build #4433 - Engineering Case #357965)================ Under certain conditions, SELECT DISTINCT queries with complex ORDER BY expressions may have received an erroneous syntax error. For example, the following query would have failed with SQLCODE -149: Select distinct e.emp_lname + space(50) + '/' + e.emp_fname from employee e, employee e2 where e.emp_id = e2.emp_id and e2.dept_id = 100 and (e.city = 'Needham' or e2.city = 'Burlington' ) order by e.emp_lname + space(50) + '/' + e.emp_fname This problem has been corrected. ================(Build #4433 - Engineering Case #358040)================ In rare low-memory situations, the server could have crashed or quietly ended. This has been fixed. ================(Build #4435 - Engineering Case #356216)================ The creation or execution of a stored procedure may have caused a server crash if the parameter list contained the special values SQLCODE or SQLSTATE, and in the procedure body a Transact-SQL variable was declared (ie variables that start with @). This has nowbeen fixed. ================(Build #4435 - Engineering Case #357683)================ When an application closed a cursor, the server was not freeing the cursor's resources before dropping the associated prepared statement or when the connection ended. This caused problems for applications that open many cursors on the same prepared statement. These applications would get errors when attempting to open a cursor, such as "Resource governor for 'cursors' exceeded", if the option MAX_CURSOR_COUNT was not set, or "Cursor not open". Now the cursor's resources are freed when a cursor is closed. ================(Build #4435 - Engineering Case #358497)================ If a database with auditing enabled required recovery, the server may have indicated during recovery that the log file was invalid. If an audit record in the transaction log was only partially written, the audit record would have appeared corrupt. This is now ignored if the partial audit record is at the end of the log. ================(Build #4437 - Engineering Case #355292)================ Updating the version of jConnect to a newer version than the one shipped with ASA (ie newer than 5.5), would have likely have resulted in postioned updates failing with an exception. Versions of jConnect newer than 5.5 support the new status byte that was added to allow distinguishing between a NULL string and an empty string. When performing positioned updates, jConnect sends the KEY column values so that the row being updated can be uniquely identified. This status byte was not supported for KEY columns, but the server was still expecting it, resulting in a protocol error. This has been fixed. ================(Build #4438 - Engineering Case #359212)================ The debug server log, (output generated bu -z command line option), could have contained extraneous "Communication function <function name> code <number>" diagnostic messages. For example after stopping a database using dbstop. Similarly there could have been extraneous instances of this diagnostic message in the client LogFile. These extraneous diagnostic messages have been removed. Please note that this diagnostic message can still validly occur under some circumstances and may be useful to help Technical Support diagnose other problems. This change also prevents some spurious "connection ... terminated abnormally" messages. ================(Build #4438 - Engineering Case #359242)================ The server could have crashed when attempting to get a db_property for a database which is in the process of being started. When a database is being started, a "stub" database object is added to the server's list of databases, which has NULL pointers for a number of fields, including the statistics counter array. Calling the db_property() function would have attempted to get statistics for the stub database. Fixed by only getting properties for active databases. ================(Build #4442 - Engineering Case #360464)================ If a grouped query had a base table's column T.A in its select list, and the table T qualified to be eliminated by the join elimination algorithm, then T.A might have been incorrectly renamed. This has been fixed. For example: The query below returned a result set which had the first column renamed "A2": create table T1 ( A1 int primary key); create table T2 ( A2 int, foreign key (A2 ) references T1(A1) ); select A1 from T1 key join T2 group by A1 Note that the query was rewritten by the join elimination algorithm into: select A2 from T2 group by A2 Now, the query is rewritten into: select A2 as A1 from T2 group by A2 A work around for this problem is to alias all the columns referenced in the SELECT list with their own names. For example, the query Q' below is not affected by this bug: Q': select A1 as A1 from T1 key join T2 group by A1 ================(Build #4443 - Engineering Case #360455)================ During unloading or rebuilding a database a non-clustered index may have been recreated as a clustered index. This would have happened if there was at least one table with a clustered index and subsequent unloaded table definitions had a non-clustered index with the same index id as the clustered index. This has now been fixed. ================(Build #4444 - Engineering Case #356739)================ If a trigger on table T referred to a column of T that had been dropped or renamed, then the server could have crashed when processing a query referring to T after the server was restarted. For the crash to have occurred, the referencing query must have been sufficiently complicated to allow predicates to be inferred. The cause of the crash has been fixed, and other changes have already made it impossible to rename or drop columns referenced by triggers. ================(Build #4446 - Engineering Case #360311)================ A query with a large number of OR'ed predicates (about 20,000 on Windows systems) may have caused the server to crash. For example: select T2_N.b from T1, T2, T2_N where T1.a = T2.b and T2.b = T2_N.b and ( T1.a = 1 or T1.a = 2 or T1.a = 3 or .... or T1.a = 20000) The number of OR conditions to cause the crash depended on the available stack size. This problem has been fixed. Now these queries return an error "Statement size or complexity exceeds server limits". ================(Build #4447 - Engineering Case #359741)================ If a synchronization was performed prior to changing the database options Truncate_timestamp_values to ON and Default_timestamp_increment to a value which would disallow timestamp values with extra digits of precision, the next synchronization would have caused a server crash. The server will now display an assertion indicating that an attempt to store an invalid timestamp value in a temporary table was made. The options must be changed before the first synchronization is performed. ================(Build #4447 - Engineering Case #361184)================ A query with a large WHERE clause containing the conjunction and disjunction of many literals could have caused the server to hang with 100% cpu usage and eventually run out of memory and fail with a "Dynamic Memory Exhausted" message. This has been fixed. ================(Build #4450 - Engineering Case #360237)================ Memory-intensive operations, such as a sort, hash join, hash group-by, or hash distinct, could have caused the server to fail with a fatal memory exhausted error, if they were executed in an environment where the operation could not be completed completely in the available memory. This issue affected all platforms, and has now been fixed. ================(Build #4450 - Engineering Case #360694)================ The server could have deadlocked, and appear to be hung, if a transaction yielded to a checkpoint (by context switching, waiting for a lock or waiting for network I/O) after rolling back to a savepoint. This has been fixed. ================(Build #4450 - Engineering Case #361999)================ Index statistics for SYSATTRIBUTE could have become out of date, resulting in errors being found when running the Database Validation utility dbvalid. This problem has now been resolved. ================(Build #4451 - Engineering Case #362311)================ When estimating the selectivity of a predicate of the form "column = (correlated subselects)", the server was treating the predicate as "column = (single value)". This assumption could have lead to overly low selectivity estimates resulting in poor plans. In reality, the correlated subselect can cause a large number of values to be compared with the column, resulting in many rows. Now, the server will use a "guess" estimate of 50% for the selectivity of these predicates. ================(Build #4453 - Engineering Case #354157)================ When starting a database "read-only" using the "-r" command line option, the server could have failed with assertion 201851, if the database had been created by ASA 8.0.0 or newer. This has now been fixed. ================(Build #4453 - Engineering Case #362312)================ The restructuring of column statistics in the server could have caused memory corruption, which can result in various symptoms, including server crashs and assertions. The chances of this problem happening was remote. It could only have occurred if the memory allocator returned the same memory as that used in a previous invocation of the restructuring of the same histogram. This problem has now been resolved. ================(Build #4454 - Engineering Case #359745)================ If a stored procedure declared a temporary table and returnd a result set, opening a cursor on the procedure would have made the temporary table visible outside the procedure. This has been fixed. ================(Build #4454 - Engineering Case #360885)================ Using variable assignments in a positioned update, (e.g update T1 set id = @V1, @V1 = @V1 + 1 where current of curs), would have caused a server crash. Now, variable assignments in a positioned update are supported. ================(Build #4454 - Engineering Case #361512)================ If a stored procedure contained a CREATE VIEW statement, the second execution of the CREATE VIEW statement may have failed with a "column not found". This has been fixed. A workaround is to use EXECUTE IMMEDIATE to create the view. ================(Build #4454 - Engineering Case #362220)================ If another transaction attempted to query or modify a table while a the fast form of TRUNCATE TABLE was executing on the same table, the server could have failed an assertion, and in some cases, possibly corrupted the database. This was not likely to occur on single processor Windows platforms. This problem has been corrected. ================(Build #4454 - Engineering Case #362585)================ Queries that used a multi-column index could have returned incorrect results. For this to have occurred, all of the following must have been true: - The index must have been comparison-based. - One of the first few columns being indexed must have been a short character (or binary) column [the column must have been fully hashed]. This column must not have been the last column being indexed. - The query must have contained a comparison involving this column [say with domain char(n)] and a string s with length > n whose n-byte prefix appeared as a value in the column. This problemhas now been corrected. ================(Build #4457 - Engineering Case #363251)================ When using the FORWARD TO statement in interactive mode (i.e. issuing a "FORWARD TO <server>" statement first and then issuing individual statements, all of which are to be executed on the remote server), there was a pobbibility that one, or all, of the statements would have been executed locally instead of remotely. There was also a pobbibility that the statements will not have been executed at all. This problem was most likely to have occurred when connected via jConnect, or if the remote server name had a space in it, or any character that would required quoting. This problem has now been fixed. ================(Build #4457 - Engineering Case #363397)================ The server could possibly have crashed on shutdown, if the Java VM had been used. This would occurred if the VM needed to load additional classes during shutdown. Now, failure to load a new class during shutdown is handled by the Java's exception mechanism and the VM will still shutdown. ================(Build #4460 - Engineering Case #363861)================ A query such as the following: select 'a', 'a' from employee group by 'a', 'a' where a constant string appears in both the select list and the GROUP BY clause, could have caused the server to crash. This has been fixed. ================(Build #4462 - Engineering Case #364246)================ A reference to a column not in the GROUP BY list, when made from an IN condition, was not being reportrd as an error. For example: select if emp_id in (1) then 0 else 1 endif from employee group by state This problem is now fixed. ================(Build #4462 - Engineering Case #365508)================ When used with multiple Java Threads, and Synchronized Java Methods, Java Stored Procedures could have produced unexpected results. This has niw been fixed. ================(Build #4463 - Engineering Case #362895)================ In some cases, the selectivity estimate for a predicate '<column> IS NULL' could have been set incorrectly to 0. This could have lead the query optimizer to select poor execution plans, for example, selecting an index to satisfy an IS NULL predicate instead of another, more selective predicate. For this problem to have occurred, a query must have contained a predicate of the form: T.col = <expr> The expression <expr> must have been an expression whose value was not known at query open time. For example, <expr> could have been a column of another table, or it could have been a function or expression that was not evaluated at optimization time. The predicate must have been the first predicate evaluated for the associated table scan, and the table T must have been scanned once with the value of <expr> being NULL. In these circumstances, the selectivity of 'T.col IS NULL' would be incorrectly set to 0. This has been fixed. If an application opened a cursor over a query that contained an index scan with a single column in the index being searched for equality, the selectivity estimate could have been lowered incorrectly if the application scrolled the cursor using absolute fetches and did not visit all of the rows of the result set but ended the scan after the last row of the result set. This problem would have resulted in selectivity values being stored that were lower than expected, and could have lead the query optimizer to select poor execution plans by picking an index on this column instead of a better index. This problem has also been fixed. ================(Build #4465 - Engineering Case #365038)================ If a statement that modified a remote table was executed within a savepoint, no error was given, even though remote savepoints are not supported. Now, if an UPDATE, DELETE or INSERT statement attempts to modify a remote table while inside a savepoint, it will fail with the error "remote savepoints are not supported". Note that remote procedure calls within a savepoint will also fail with this error, as there is a chance the remote procedure will modify tables on the remote database. ================(Build #4467 - Engineering Case #365480)================ When running on NetWare systems, if the ASA server failed with a fatal error, the NetWare server would have abended. This has been fixed. ================(Build #4468 - Engineering Case #365188)================ If a view was defined with the "WITH CHECK OPTION" clause and had predicates using subqueries, then opening an updatable cursor or executing an UPDATE statement might have caused a server crash. This has been fixed. For example: create view products as select p.* from prod as p where p.id = any(select soi.prod_id from sales_order_items soi KEY JOIN sales_order so where so.order_date > current date ) with check option The following INSERT statement would have crashed the server: insert into products (id) values ( 1001 ) ================(Build #4468 - Engineering Case #365457)================ It was possible for the optimizer to chose a query access plan that did a sequential scan of a base table, even when a suitable and more efficient clustered index was available, resulting in poor performance. This choice was particularly bothersome for reasonably wide range scans, (thousands of rows), over very large tables, (millions of rows). The server now does a better job of costing clustered index scans. ================(Build #4469 - Engineering Case #365730)================ If a server attempted to start what appeared to be a valid database file, and the database failed to start for any reason, then unexpected behavior could have occurred on future requests to the same server. The unexpected behavior could have included server crashes, assertions, and possibly database corruption. This has been fixed. ================(Build #4471 - Engineering Case #365147)================ When using the -m command line option (truncate transaction log after checkpoint), if a transaction log file was being actively defragmented or virus scanned at the time a checkpoint occurred, then the server could have failed with assertion 101201. The operating system will not allow the file to be recreated until the virus scan or defragmentation has completed. As a result, the server will now wait and retry the operation several times. A workaround would be to remove the transaction log file from the list of files that are actively scanned or defragmented. ================(Build #4471 - Engineering Case #366150)================ The server could have become deadlocked when executing the system procedure sa_locks. For this to have occurred, two connections must have been issuing sa_locks calls concurrently, or the user definition for the owning connection was not in cache, which is not a likely occurence. This problem has been fixed. ================(Build #4471 - Engineering Case #366532)================ Computed columns with JAVA expressions may have be incorrectly parsed, causing the error: "ASA Error -94: Invalid type or field reference". This problem occurred if the computed column belonged to a table B, and there existed another table A, used in the same statement, having a column with the same name as the JAVA class name. This has been fixed. For example: The following query returned the error "ASA Error -94: Invalid type or field reference": select * FROM A WHERE A.ID NOT IN ( SELECT B.ID FROM B ); Table B has the computed column "EntityAddressId" referencing the JAVA class "Address", and table A has a base table column named "Address". Note that the computed column doesn't have to be referenced in the query. CREATE TABLE A ( ID int, "Address" varchar (10) ); CREATE TABLE B ( ID int, "EntityAddressId" numeric(10,0) NULL COMPUTE (Address >> FindAddress(0, '/', 0)), ); ================(Build #4472 - Engineering Case #366167)================ Database recovery could have failed when mixing Transact-SQL and Watcom SQL dialects for Create/Drop table statements. This has been fixed. The following example could have caused database recovery to fail if the server crashed before the next checkpoint. create global temporary table #test (col1 int, col2 int); drop table #test; create global temporary table #test (col1 int, col2 int); drop table #test; A workaround is to only use #table_name for creation of local temporary tables. ================(Build #4472 - Engineering Case #366233)================ If a stored procedure contained a statement that performed a sequential scan of a global temporary table, executing the statement could have caused the server to crash. This problem would have occurred if the following conditions held: - The statement plan was cached - The table was declared as "ON COMMIT DELETE ROWS" - The table had more than 100 pages when the plan was cached - COMMIT was called before the statement was executed This problem has been fixed. The crash could be avoided by setting the option 'Max_plans_cached' to 0. ================(Build #4472 - Engineering Case #366282)================ The CREATE SCHEMA statement was not being logged correctly in the transaction log if it contained at least one CREATE VIEW statement. The statement logged was the last CREATE VIEW statement, instead of the entire CREATE SCHEMA statement. As a consequence, the CREATE SCHEMA statement was not recoverable. Also, recovery could have failed with a "Failed to redo an operation" assertion, if the logged CREATE VIEW statement could not have been executed, e.g., because it referred to a table created within the original CREATE SCHEMA statement. This problem has been resolved. ================(Build #4472 - Engineering Case #366364)================ Database validation, using either the Validation utility dbvalid, or executinmg the VALIDATE DATABASE statement, could have failed to detect some corrupted LONG VARCHAR columns. Assertion 202000 is now generated when a corrupted LONG VARCHAR is encountered. ================(Build #4472 - Engineering Case #366562)================ If the subsume_row_locks option is on and a table T is locked exclusively, the server should not obtain row locks for the individual rows in T when executing an UPDATE. This was not the case if T was updated through a join (or if T had triggers, computed columns, etc.), or if T was modified via a keyset cursor. Now, no locks are aquired in this situation. ================(Build #4474 - Engineering Case #365603)================ Making an RPC call, or executing a FORWARD TO statement, may have failed to return a result set, even though one was returned by the remote server. Note that this problem only happened when the Remote Data Access class was either ASAJDBC or ASEJDBC. This has been corrected. ================(Build #4474 - Engineering Case #366267)================ When the database option Ansi_close_cursors_on_rollback was set to 'ON', the Validation utility dbvalid would have failed to validate all the tables in the database. The error 'cursor not open' would have been displayed. This has been fixed. ================(Build #4474 - Engineering Case #366552)================ When making a remote procedure call to a remote server whose class was either ASAJDBC or ASEJDBC, if the remote procedure was a Transact-SQL procedure, with either an INOUT or OUT argument that returned a result set, then it was likely that the rows in the result set will not have been returned. The INOUT or OUT parameters were incorrectly being fetched first, prior to fetching the result set. In JDBC, fetching the value of an OUT or INOUT parameter will close all result sets. Now the values of OUT or INOUT parameters are fetched only when the procedure has completed execution. ================(Build #4475 - Engineering Case #366920)================ Calling the DATEPART() function, with the date-part CalWeekOfYear, would have returned the wrong week number if the year started with a Friday, Saturday or Sunday and the day of the date-expression passed was a Sunday, but not the very first one. For example: DATEPART( cwk, '2005/01/09' ) would have incorrectly returned 2 instead 1. This has now been fixed. ================(Build #4475 - Engineering Case #367116)================ Executing a LOCK TABLE ... IN EXCLUSIVE MODE statement on a table did not prevent other transactions from subsequently obtaining exclusive locks on rows in the table when executing INSERT ... ON EXISTING UPDATE statements. Although it would have prevented explicit UPDATE statements from subsequently updating rows. This could have resulted in applications deadlocking unexpectedly. This has been fixed. ================(Build #4476 - Engineering Case #343253)================ If the database option "Close_on_endtrans" was set to ON, then the server would have failed to close some cursors when executing a COMMIT. For example, the second fetch should fail with a "cursor not open" error, but does not: BEGIN DECLARE c_fetch CURSOR FOR SELECT 1; SET TEMPORARY OPTION CLOSE_ON_ENDTRANS = 'ON'; OPEN c_fetch; FETCH c_fetch; COMMIT; FETCH c_fetch; END; As well, if the database option "Ansi_close_cursors_on_rollback" was set to ON, then the server could have crashed in some situations where a rollback occurred inside a call to a user defined function. For example, the following would have caused a server crash: create function DBA.foo() returns int begin grant select on systable to non_existent_user; return 1 end create procedure bar() begin set temporary option ANSI_CLOSE_CURSORS_ON_ROLLBACK = 'on'; select foo() end ; select * from bar() Both of these problems have now been resolved. ================(Build #4476 - Engineering Case #365953)================ If a user-defined function contained a COMMIT, calling the function in a SELECT statement within a batch or procedure would have caused the cursor for the batch or procedure to be closed if the cursor was not declared WITH HOLD. This may have resulted in unexpected error messages like "Column '@var' not found". Now these cursors will not be closed. ================(Build #4476 - Engineering Case #367342)================ If the first byte of the DELIMITED BY string for a LOAD TABLE statement was greater than or equal to 0x80, the LOAD TABLE statement would not have recognized any delimiters in the input file. This is now fixed. ================(Build #4477 - Engineering Case #363767)================ Deleting or updating a large number of rows could have taken longer than a comparable operation done with a server from version 8.0.1 or earlier. This would only have been observed when using a database created with version 8.0.0 or later. This has been corrected. ================(Build #4478 - Engineering Case #367661)================ Executing an INSERT ... ON EXISTING UPDATE statement could have caused a deadlock in the server, if another transaction was updating the table that was being modified, and a checkpoint (or DDL statement) was pending. This has been fixed. ================(Build #4478 - Engineering Case #367663)================ The server could have failed to drop a temporary table on a database opened read-only. This would only have occurred if the temporary table was declared using Transact-SQL syntax, (ie "#table_name"). This has been fixed. ================(Build #4478 - Engineering Case #367689)================ When running on NetWare systems, executing complex queries could have caused the server to abend with CPU Hog Timeout. This has been fixed by adding more yields, and checks for stack overflows, in the optimizer. ================(Build #4478 - Engineering Case #367716)================ The userid 'dbo' was unable to use EXECUTE IMMEDIATE to execute a string containing a multi-statement batch. This restriction has now been removed. ================(Build #4479 - Engineering Case #366401)================ Rebuilding databases on Unix systems, using the Unload utility dbunload with the -ar or -an command line options, would have failed during the rebuild operation, if the source database had table or row constraints that specified stored procedures. This has been fixed. ================(Build #4479 - Engineering Case #367688)================ Support for textual options to the Transact-SQL statement SET TRANSACTION ISOLATION LEVEL, have been added for compatibility with Sybase ASE and Microsoft SQL Server. Applications can now issue the following variants: SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SET TRANSACTION ISOLATION LEVEL READ COMMITTED SET TRANSACTION ISOLATION LEVEL REPEATABLE READ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE which correspond to setting the isolation level of the connection to 0, 1, 2, or 3 respectively. ================(Build #4479 - Engineering Case #367935)================ When run on Unix systems, the server could have crashed when a non-DBA user was connected, if auditing was enabled. This has been fixed. ================(Build #4480 - Engineering Case #368053)================ If a client application terminated while the last connection to the server was in the process of being disconnected, the server may not have autostopped when it should. In these cases, the server icon and window would still have been active, and the database would have been stopped, but no connections could have been made to the server. Pressing shutdown would have stopped the server though. This problem has now been corrected. Note, this scenario could have occurred in a multithreaded application if all of the following conditions were true: - the server was autostarted by a multithreaded application - the main thread of the application signaled a child thread to shut down - the child thread did a disconnect as part of shutting down - the main thread did not wait for the child thread to complete before ending This has been fixed so that the server will correctly autostop. ================(Build #4480 - Engineering Case #368127)================ If a remote server was created using one of the Remote Data Access ODBC classes, opening a cursor on a proxy tables from that server would have leaked about 8 bytes of memory for each remote column. Memory allocated at cursor open time, to hold the indicator for each column, is now freed when the cursor is closed. ================(Build #4482 - Engineering Case #368251)================ The server would have failed to return the result set under certain circumstances. One such situation was when the option Row_counts was set to 'ON' and the query access plan had an indexed sort node at the top. This problem has now been fixed. ================(Build #4482 - Engineering Case #368551)================ The server could have crashed when executing Java code. This has been fixed. ================(Build #4484 - Engineering Case #369122)================ The server may have exhibited poor performance if many connections try to concurrently truncate a global temporary table. This was due to each connection attempting to acquire an exclusive lock on the global temporary table definition. Since each connection already has a pointer to the table definition, acquiring an exclusive lock is no longer done. ================(Build #4485 - Engineering Case #368236)================ In rare circumstances, if a database which required recovery was autostarted, the server could hang with the server window still minimized. One situation where this could have occurred was when the database had a "disconnect" event. A workaround is to start the database manually first to allow the database to recover, and then shutdown this engine. This issue has been fixed. ================(Build #4485 - Engineering Case #369234)================ The server may have occasionally appeared to temporarily hang with CPU usage at 100%. This would have occurred when there were only a few pages of the server's cache available for reuse. The server would have continually reused these few pages rather than immediately grow the cache. This problem has been corrected. ================(Build #4485 - Engineering Case #369410)================ If a stored procedure was dropped and then another stored procedure with the same name was immediately created, users who had permission to access the first procedure, and had already called it, will still have been able to access the second procedure, even if they have not explicitly been given permission, until the next time the database was stopped. This has been fixed. ================(Build #4489 - Engineering Case #366682)================ A query that satisfied the following conditions would have incorrectly failed with the error "Invalid use of an aggregate function": - it used an ANY, ALL, IN, or NOT IN subquery - the subquery used a grouped derived table or view - the derived table or view aliased an aggregate function - the alias was used in another column of the derived table or view For example: select 1 where 1 not in ( select b from (select sum(1) as b, b + 1 as c) dt ) This problem has now been fixed. ================(Build #4489 - Engineering Case #370045)================ Insert performance on systems with three or more processors would have been much poorer than on single processor systems. The drop in performance would have been more noticable as the number of processors increased (and was likely even more noticeable on Unix systems). This problem has now been corrected. ================(Build #4491 - Engineering Case #370312)================ A query in a procedure or batch, with an expression that involved remote tables and a unary minus or simple cast operator, would have failed with the error: ASA Error -823: OMNI cannot handle expressions involving remote tables inside stored procedures. This problem has now been fixed so that these operators do now work in expressions involving remote tables. ================(Build #4496 - Engineering Case #343581)================ When a row was inserted into a table with a COMPUTE or CHECK clause that contained a correlated subselect, where the outer references was to a column of the base table, the server may have crashed. This has been fixed. In the example below, the outer reference T.a is used in a subselect of the COMPUTE clause for the column T.b: create table T( a int, b char(10) not null COMPUTE (left( '0001', (select max(row_num) from rowgenerator where row_num = T.a )) )) insert into T values (1, '1') ================(Build #4496 - Engineering Case #370071)================ When the BACKUP DATABASE TO statement failed and returned an error, (for example if the location for the achive file was not writable), then subsequent BACKUP DATABASE TO statements that failed would have caused the server to fail with assertion 104400 (a stack overflow) on Solaris 8 or 9 systems. This has been fixed. ================(Build #4496 - Engineering Case #370456)================ Executing a VALIDATE TABLE statement, and using the WITH EXPRESS clause, (or dbvalid -fx), would have failed with the error "Not enough memory to start", if the currently available cache space was not large enough. If cache resizing is possible, the server will now try to increase the cache size to the amount required. ================(Build #4496 - Engineering Case #371032)================ If a query referenced both proxy and local tables, or proxy tables from different servers, then it will have to be executed in 'no passthru' or 'partial passthru' mode. If such a query also contained column references of the form 'user.table.column', then the query would have failed with error -845 "Owner '<owner name>' used in qualified column reference does not match correlation name '<table name>'". This problem has now been fixed. ================(Build #4497 - Engineering Case #370421)================ If the ROUND() function rounded a numeric value, the resulting value may not have fit into the original NUMERIC data types percision. For example: The constant 9.995 is of type NUMERIC(4,3). The result of ROUND(9.995,1) is 10.000 which does not fit into numeric(4,3). As a result the numeric value generated by the ROUND() function could have been invalid and a conversion of this numeric value to a string could have returned '?'. This problem has been fixed. If the numeric value passed to ROUND() is a constant, the resulting data types percision is increased by one, (numeric(5,3) in the above example). If it is not a constant and the resulting value does not fit, then a SQLE_OVERFLOW_ERROR is generated if the option Convertion_error is set, otherwise NULL is returned. ================(Build #4499 - Engineering Case #355123)================ The server could have performed poorly relative to 7.x servers when doing a long sequence of database inserts, updates or deletes. The server was spending longer than necessary cleaning up the cache in preparation for a checkpoint. This time has now been reduced. Also, current servers now estimate the recovery time better. Thus the Recovery_time database option may need to be set to a larger value in order to have the server more closely match the value the 7.x server would have used. ================(Build #4500 - Engineering Case #372122)================ Engineering Case 304975 added support for handling UUID/GUID columns in proxy tables to remote servers. Unfortunately, that change had the side effect of disallowing creation of existing proxy tables with smalldatetime columns. The problem with the smalldatetime column has now been fixed. ================(Build #4501 - Engineering Case #372481)================ The estimate of the rate at which pages are being dirtied has been made less pessemistic (a smoothed version of the estimates used in 7.x). Also, on 32 bit Windows systems, the server now measures the random write times rather than using the cost model estimates, as this caused the estimates to be off by a factor of 50 in some cases. This is a further performance improvement to the issue originally addressed by Engineering Case 355123. ================(Build #4502 - Engineering Case #372605)================ If an application, connected to a server via jConnect, cancelled a request or closed a JDBC statement, the cancel or close could have failed and/or dropped the connection entirely. This problem has been fixed. ================(Build #4502 - Engineering Case #373028)================ Stopping a server while a database was in the process of either starting or stopping, could have caused incorrect behaviour, such as the database requiring recovery the next time it is started, or the server asserting, crashing or hanging. Now, server shutdown waits for databases which are not active, to finish starting or stopping before shutting down, and ensures that a database is not stopped twice. ================(Build #4503 - Engineering Case #372882)================ If a view was created with an owner like: "create view dba.V1 as select c1 from T1" the preserved source of this view (column SOURCE in SYSTABLE) would have contained an space character following the owner; e.g "create view dba .V1 as select c1 from T1". As well, if a view was created with a "select * ...", the view definition (column VIEW_DEF in SYSTABLE) was unparsed without the space between the "select" and "*"; e.g. "select* ...". Neither of these errors caused problems in ASA, but did cause problems for Powerdesigner. Both issues have been fixed. ================(Build #4503 - Engineering Case #373462)================ If a CREATE TABLE statement failed, for example because of duplicate column names, and no commit or rollback was executed so far, the next attempt to execute a CREATE TABLE statement, on any connection, would have crashed the server or cause an assertion failure 102801. This has now been fixed. ================(Build #4506 - Engineering Case #374976)================ The debugger would have shown all connections on the server, instead of only showing those connections to the database that the debugger was connected to. This has been fixed. ================(Build #4511 - Engineering Case #376019)================ Executing queries containing the GROUP BY clause could have caused the server to crash. The changes for Engineering Case 332010, and a related change for case 363861, introduced the problem, which has now been fixed. ================(Build #4511 - Engineering Case #376742)================ If the sybase_sql_ASAUtils_retrieveClassDescription() function was called with a very long class name, a server crash could have occurred. This has been fixed. ================(Build #4512 - Engineering Case #370899)================ Several race conditions in the server while starting and stopping databases have now been fixed: - The server could have autostopped a database when it should not have, or not autostopped a database when it should have. - In rare timing dependent cases, the server could have deadlocked, asserted or possibly crashed, when a database was starting up or shutting down. Also in rare timing dependent cases, the server could have asserted or possibly crashed if HTTP or HTTPS requests were made to a database that was starting up or shutting down.

Adaptive Server Anywhere - Sybase Central Plug-in

================(Build #4076 - Engineering Case #296095)================ When changing the SQL Remote Send Frequency for the consolidated user on a remote database through the SQL Remote tab of the Database Properties dialog, it was possible to break replication. Possible symptoms included data not being sent from the remote, or the consolidated database continuously reporting that there was a missing message. This has now been fixed. ================(Build #4076 - Engineering Case #299575)================ If the main Sybase Central window was partially off screen, any dialogs that were opened may also have been partially off screen. This has now been fixed. ================(Build #4079 - Engineering Case #300375)================ When editing a BIT value and then switching to a new row the change would be lost. This has now been fixed. This problem occurred in dbisql as well. ================(Build #4092 - Engineering Case #302925)================ Using a Database, Message Type or User property sheet to set a publisher's, consolidated user's or remote user's address for SQL Remote, would have removed any backslashes in the address unless they were doubled up. They needed to be double up each time a change was made to settings on the page of the property sheet. This has been fixed. ================(Build #4096 - Engineering Case #304202)================ On Unix platforms, when editing table data in Sybase Central, (or dbisql), pressing the TAB (or SHIFT-TAB) key would have resulted in the focus moving over two cells instead of just one. This has now been fixed. ================(Build #4207 - Engineering Case #306643)================ When trying to create a new service, checking the properties of an existing service, or creating a new integrated login, it was possible to for Sybase Central to crash if a large number of local users were defined on the system. This is now fixed. ================(Build #4211 - Engineering Case #307991)================ When displaying data for views that referenced proxy tables, duplicate rows would have been shown, if the connection to the database was made using jConnect. This has been fixed so that the correct rows are now displayed. ================(Build #4214 - Engineering Case #308999)================ Clicking the Help button while in the Query Editor, would have done nothing. It now correctly displays the help screen. ================(Build #4237 - Engineering Case #314969)================ If the Database Object Debugger was launched from Sybase Central and a connection made, then if dbisql was also launched from Sybase Central and a connected made, it, the Object Debugger and Sybace Central would all have hung. This has now been fixed. ================(Build #4246 - Engineering Case #317240)================ Procedure profiling was not availble on a case-sensitive db (the menu entries to use it were missing). This has now been fixed. ================(Build #4249 - Engineering Case #304262)================ If more than about 200 characters were specified in the parameters text area of a service's property sheet, then the next time the property sheet was opened, the parameters would be empty. This has been fixed. ================(Build #4253 - Engineering Case #318929)================ When run on linux, the plug-ins Help>Adaptive Server Anywhere x>Online Resources menu item did nothing. It has been removed. ================(Build #4256 - Engineering Case #319516)================ On WindowsXP, the location numbers for the Sybase Central window were set incorrectly when the window was maximized and closed. This has now been fixed. ================(Build #4259 - Engineering Case #304559)================ When attempting to change the list of filtered owners for a WIN_LATIN5 (Turkish) database, the error "ASA Error -143: Column '@p0' not found" would have been displayed. This has been fixed. ================(Build #4259 - Engineering Case #320277)================ When installed on Windows 2003, the Services folder in the ASA and MobiLink plug-ins for Sybase Central would not be available. This has been fixed. ================(Build #4263 - Engineering Case #320974)================ When using the Erase Database wizard to erase a Write file, the Write file would not have been displayed when browsing for it, unless the file filter was changed to display all files. This has been fixed, the file filter now includes Write files. ================(Build #4271 - Engineering Case #321929)================ If the value specified for a Global Autoincrement partition size in the Column property sheet or the Domain wizard, was larger than 2^31-1, then the value would have been ignored. Now, the arbitrarily large values are respected. ================(Build #4279 - Engineering Case #324248)================ In the User Options dialog, the Set Temporary Now button was enabled whenever an option was selected in the list, regardless of whether the option could actually be changed via a SET TEMPORARY OPTION statement. Now, the button is only enabled when displaying options for the PUBLIC group or the current user. ================(Build #4286 - Engineering Case #325396)================ The "Time_format", "Date_format", and "Timestamp_format" options were being ignored when displaying table data with the "Data" tab. This is fixed and these options are now respected. ================(Build #4303 - Engineering Case #328984)================ When entering dates on the "Data" tab of a database table, all dates were assumed to be in "YMD" order, even if the "Date_order" option was set differently. Now, the setting of "Date_order" is respected. ================(Build #4304 - Engineering Case #321934)================ In the Create Database, Restore Database, Compress Database, Uncompress Database, Create Write File and Erase Database wizards, if the option to have the wizards start a new local server automatically was selected, and for some reason the server could not be started or the connection could not be established, then the wizards would have displayed an internal error. This has been fixed. ================(Build #4328 - Engineering Case #335100)================ Specifying an account of the form domain\user, in the Service wizard or property sheet, was not possible because the "Other account" drop-down list was not editable and only contained the local machine's accounts. Now, the list is editable so any user can be specified, with or without a domain. ================(Build #4333 - Engineering Case #336502)================ When profiling triggers and events, the statistics may not have lined up with the source. This has now been fixed. ================(Build #4337 - Engineering Case #337778)================ When editing table data, if the Edit button was clicked, and a new row was then selected without making a change, the buttons would still have displayed that the dialog was in edit mode, even though the edit had been cancelled. THe mode is now reset properly in this situation. ================(Build #4345 - Engineering Case #339659)================ The plug-in may have inadvertently created one or more shared locks that were not released until a disconnect. The locks were created when connected to the database via jConnect and the Procedures and Functions or UltraLite Projects folders were opened. These shared locks could have caused operations on other connection to fail, such as attempting to unload the database from within Sybase Central (which uses a separate connection to perform the unload). Shared locks are now released as soon as possible. ================(Build #4368 - Engineering Case #344171)================ When using Sybase Central's Log Veiwer, the Newest First and Oldest First sort order was reversed. This has been corrected. ================(Build #4384 - Engineering Case #347269)================ The calendars displayed in the Event Schedule dialog and the Translate Log File wizard was always using Sunday as the first day of the week. Now, the current locale is used to determine which day should be as the first day of the week. For example, in French, German, Chinese and Japanese locales, the first day of the week is Monday. ================(Build #4398 - Engineering Case #352293)================ Moving the mouse over an object in the right panel, may have caused an exception to have been thrown when creating the Tooltip string. This has been fixed. ================(Build #4402 - Engineering Case #351546)================ When in the Code Editor, if Auto indent was set to Default or Smart, pressing enter with text selected would have added a new line to the selection, rather than replacing the selection with a new line. The problem does not occur when tab Auto indent is set to none. This problem has now been fixed. ================(Build #4406 - Engineering Case #351247)================ If the help file dbmaen8.jar was not installed in the ASANY8\java directory, every time a property sheet, dialog or wizard was opened, an error dialog would have been displayed. Now, the error dialog is only displayed when you help is explicitly asked for. ================(Build #4407 - Engineering Case #352456)================ A service executable path name containing a dash "-", would have been truncated at the character immediately before the dash when the path name was displayed in the Service property sheet. This has now been fixed. ================(Build #4417 - Engineering Case #354282)================ When creating a column, or changing its type, the list of available system-defined default values for types of binary, varbinary or long binary, included the date, time and timestamp values. However, if one of these values was choosen as the default, attempting to save the changes to the column would have resulted in a "Cannot convert <type> to a binary". This has been fixed, the date, time and timestamp types are now excluded from the list of system-defined default values when choosing a binary data type. ================(Build #4418 - Engineering Case #354579)================ The total connection count, listed on a database's property sheet, would not have been updated each time the property sheet was opened. This has now been fixed. ================(Build #4423 - Engineering Case #355830)================ A NullPointerException could have occurred in the following situation: - Open a second window, like when editing a stored procedure - Make a change to the procedure, close the window, when it prompts to save changes, respond NO - The window closes, but the Sybase Central window does not have focus - pressing TAB or CTRL-TAB will caused the exception This has now ben corrected ================(Build #4451 - Engineering Case #362226)================ On Linux systems, getting information about a table's primary key, by clicking the 'Details' button on the Property dialog, would have caused a ClassCastException. This is now fixed. ================(Build #4454 - Engineering Case #362803)================ If the help window was opened and closed, and then Sybase Central was minimized, the help window would have been reopened when Sybase Central was then maximized. Note, this same problem affected Interactive SQL dbisql, as well. This has been fixed. ================(Build #4503 - Engineering Case #373172)================ In the Translate Log File wizard, selecting 'Include trigger generated transactions' and 'Include as comments only', would have included the trigger generated transactions as statements rather than as comments. This has been fixed.

Adaptive Server Anywhere - Utilities

================(Build #3994 - Engineering Case #290138)================ When running in console mode, DBISQL would not have displayed BINARY values correctly, they would have appeared as a string similar to "[B" followed by up to 8 hexadecimal digits. Now, they appear as "0x" followed by a string of hex digit pairs. This problem was restricted to results printed on the console. It did not affect the windowed mode of the program, nor was the OUTPUT statement affected. ================(Build #4075 - Engineering Case #293018)================ When the reload.sql script, generated by the dbunload utility, was run to rebuild a database, it may have returned a permission denied error when attempting to grant table or columns permissions. This would have happened if the user who originally granted the permission no longer had the appropriate permission at unload time. This problem has been fixed. All grants for table and column permission now use the new additional FROM {grantor} syntax and run under the DBA user specified for the unload. ================(Build #4076 - Engineering Case #279969)================ After rebuilding a Mobilink remote database using dbunload -ar, the DBMLSync utility would have returned the error: No off-line transaction log file found an on-line transaction log starts at offset ... as dbunload did not save the current transaction log and reset the start and relative log offset in the rebuilt database. This has been fixed. ================(Build #4076 - Engineering Case #296669)================ When calling xp_sendmail using SMTP, the first word of the body of an email message could have been removed by some SMTP servers. The fix was to add a carriage return/linefeed at the beginning of each body. Now this gets stripped out instead of the text. ================(Build #4076 - Engineering Case #298299)================ Due to an off-by-one error in the logic which filtered system procedures out of the list of procedures received from the server, the "Lookup Procedure Name" dialog could have shown a single system procedure, depending on the order in which procedure names were returned from the server. The first item in the list was never subject to the filter. This is now fixed. ================(Build #4076 - Engineering Case #298383)================ The Import Wizard could have reported an internal error if, on the second page, the "Use an existing table" radio button was selected and the name of a nonexistent table was entered, and then went on to the import the file. Now, users are not allowed to leave the second page if the table does not exist. ================(Build #4076 - Engineering Case #298423)================ The configured caret color used by the syntax highlighting editor in DBISQL was being ignored. This meant that the caret color would remain the system default caret color (the color you'd see used for the caret in Notepad, for example). Now the configured color is used. ================(Build #4076 - Engineering Case #298807)================ Providing connection information on dbisql's command line, (in either the argument to the "-c" option or in the SQLCONNECT environment variable), would have caused it to fail to connect if all of the following were true: 1. the "-odbc" option was used, and 2. connection was to the default local server, and 3. no data source was specified a in the connection parameters This is now fixed. . In this case, DBISQL would open the "Connect" dialog from which you could successfully log in. ================(Build #4076 - Engineering Case #299058)================ Tilde (~) characters were not allowed in unquoted file names. Attempting to use them caused the error "Lexical error". This problem has been fixed. ================(Build #4076 - Engineering Case #299301)================ Running the dbunload utility with options -ar or -an would not have created a reload.sql file that had check constraints turned off. This may have caused errors when loading data into the new database. This is now fixed. ================(Build #4076 - Engineering Case #299548)================ Pressing the F8 key while DBISQL was busy executing a statement, would have caused it to report an internal error. This has been fixed. ================(Build #4078 - Engineering Case #299030)================ After rebuilding an ASA primary database using dbunload -ar, running the Replication Agent would fail with the following error: Unable to find log offset ... Error processing log due to missing log(s) Dbunload did not save the current transaction log and reset the start and relative log offset in the rebuilt database. This has been fixed. ================(Build #4078 - Engineering Case #299754)================ Executing a statement which contained two consecutive comments, and the first comment contained an unmatched quotation mark, and the second comment contained a question mark, would have caused dbisql to report the error: "JZ0SA: Prepared Statement: Input parameter not set, index: 0". For example, the statement below would not have executed: CREATE PROCEDURE test AS BEGIN -- "a -- ? END This problem, which is related to issue 217915, has been fixed. ================(Build #4078 - Engineering Case #300115)================ When executing multiple consecutive MESSAGE ... TYPE WARNING TO CLIENT statements, dbisql may not have displayed the messages in the correct order. For example, when executing the following compound statement: begin message 'one' type warning to client; message 'two' type warning to client; end message "two" would have displayed before the message "one". This problem has been fixed. ================(Build #4087 - Engineering Case #300125)================ When reading a script file which contained an EOF character, (0x1A), DBISQL would have reported a "Lexical Error" rather than interpreting the character as an end-of-file marker. Now the end-of-file character is recognized correctly. Note that the end-of-file character is optional in script (.SQL) files. ================(Build #4092 - Engineering Case #302917)================ When writing preserved syntax to the reload.sql file, no newline was added between the end of the object syntax and the 'preserve format' statement. This meant that if a procedure, trigger, view or event handler was created with a trailing comment, an error would occur when trying to rebuild the database. While this is now fixed, a workaround for the problem is to avoid placing a comment at the end of the object. ================(Build #4093 - Engineering Case #302368)================ DBISQL would have reported an internal error, if an INPUT statement was executed which read a FIXED format file and all of the following were true: - The table contained more than one column - The INPUT statement contained a COLUMN WIDTHS clause - Fewer column widths were given in the COLUMN WIDTHS clause than there are columns in the table - The INPUT statement did not explicitly list the table columns ================(Build #4097 - Engineering Case #304242)================ Some long messages displayed by dbisql, (or Sybase Central), would not have been properly word wrapped when running on Unix platforms. Instead, the entire message would appear on one line which would be truncated. Long messages now word wrop correctly. ================(Build #4106 - Engineering Case #305487)================ The Import Wizard could have failed to import a file if all of the following conditions were true: - data was being imported into a new table (i.e. the table did not exist before running the Import Wizard), - the file being imported was ASCII, FIXED, or SQL, - the name of a column was changed from the defaults ("Column1", "Column2", etc.) The wizard would have failed with a message saying that Column1 (or whatever the original column name was) could not be found. This problem has now been corrected. ================(Build #4108 - Engineering Case #305817)================ Pressing the ESCAPE key while a menu was open did not close it. Now it does. ================(Build #4108 - Engineering Case #305871)================ If an attempt is made to execute a SQL statement after disconnecting from a database, dbisql will attempt to reopen the connection and execute the statement. This reopening of the connection would have failed if the connection auto-started the . That is, if a DSN, FDSN, or DBF connection parameter was given. This has now been fixed. ================(Build #4108 - Engineering Case #305936)================ Clicking the window close button, (the title bar button with an "X" in it), would not have closed the dialogs listed below: - the dialog which reports errors in SQL statements - the data prompt dialog used for the INPUT ... PROMPT statement. This has been fixed now so that the dialogs close. ================(Build #4119 - Engineering Case #308349)================ The QueryEditor would not have allowed an ORDER BY for the case were a table was being joined to itself and the same column from each aliased table was being used in the ORDER BY. This has now been corrected. For example: SELECT "m"."emp_lname", "e"."emp_lname" FROM "DBA"."employee" AS m JOIN "DBA"."employee" AS e ON "m"."emp_id" = "e"."manager_id" ORDER BY "m"."emp_lname" ASC , "e"."emp_lname" ASC ================(Build #4120 - Engineering Case #307174)================ When connected to a database via the JDBC-ODBC bridge, empty strings in LONG VARCHAR columns were displayed as NULL, rather than empty strings. This has been fixed. This problem affected the ASA plug-in for Sybase Central as well. ================(Build #4120 - Engineering Case #308346)================ Table names were being duplicated in the table expression lists on the Joins page of the Query Editor. Table names should now only be listed once. ================(Build #4123 - Engineering Case #306179)================ When used on the dbping command-line, the -o switch was not being parsed correctly. Therefore, instead of sending its output to a file, dbping -o would display the usage message. This has been corrected. ================(Build #4206 - Engineering Case #306135)================ It was difficult to enter the following types of numbers as values when editing a table in the "Results Pane": - Negative numbers (e.g. "-123") - Real numbers that began with a decimal point (e.g. ".123") - Numbers in exponential notation (e.g. "1.23e2") For example, typing the number -123, would have caused a beep when the "-" was typed and would not have allowed it to be entered in the editing box for the table data. A workaround for this was to type the number without the minus signt, then add the minus sign after. This bug affects ASA plug-in for Sybase Central as well. This is now fixed in both dbisql and Sybase Central. ================(Build #4209 - Engineering Case #307381)================ Selecting the "Insert spaces" option in the editor's "Customize" dialog, would have been ignored, and would have been set back to "Keep tabs". This has been fixed. ================(Build #4210 - Engineering Case #307751)================ If when executing a .SQL file using the READ statement, the file contained a CONNECT statement where the user name was a parameter to the .SQL file, and it was enclosed in double-quotation marks, the CONNECT statement would have failed. For example, if the following statements were in a file called TEST.SQL: PARAMETERS user_name; GRANT CONNECT TO "{user_name}" IDENTIFIED BY "{user_name}"; GRANT DBA TO "{user_name}"; CONNECT USER "{user_name}"; and were executed by: READ TEST.SQL [test] an error would have occurred that the user "USER" did not exist. This has been fixed. A workaround for the problem is to remove the quotation marks from the CONNECT statement. ================(Build #4211 - Engineering Case #307239)================ Specifying a File DSN as part of the connection string could have caused any of utilities to crash. This has been fixed. ================(Build #4212 - Engineering Case #298001)================ When calling a SQL procedure that declared an external java method which produced a result set, dbisql when using the JDBC-ODBC bridge would have reported an invalid cursor operation. This problem is now fixed. ================(Build #4212 - Engineering Case #308507)================ When connected to a database via the JDBC-ODBC bridge, the "Auto commit" option was implicitly on all the time, so that a commit was being done after every statement. This has been fixed so that commits are now implicitly done only if the "Auto_commit" option is "On". This problem did not affect connections that used jConnect. ================(Build #4213 - Engineering Case #308693)================ When the name of a file was entered in the "Database File" field on the "Database" page of the "Connect" dialog, and then the ESCAPE key was pressed while the "Database File" field still had focus, an internal error would have occurred. This has been fixed. This problem also affected the ASA plug-in for Sybase Central, the Stored Procedure Debugger, and DBConsole. ================(Build #4214 - Engineering Case #308847)================ If an attempt to connect failed, an error dialog with a "Show Details" button appeared. Clicking this button shows a summary of the connection parameters used in the attempt. Prior to this fix, the user name and password were displayed twice and the password was shown in clear text. Now the user name and password appear only once and the password is displayed as a series of asterisks. ================(Build #4215 - Engineering Case #309181)================ Inserting a new row into a table, (via right-clicking Results pane a selecting "Add"), which contained a BIT column, would have inserted the wrong BIT value in the following were true: - if the BIT value had a default of "1", and - if the BIT value was not explicitly set by the user, and - connected using jConnect. This has been fixed. This bug affected the table "Data" panel in the Adaptive Server Anywhere plug-in for Sybase Central as well. ================(Build #4215 - Engineering Case #309350)================ When trying to view the table data for a proxy table, if the data could not be retrieved because the userid or password for the remote database was no longer valid, the "Add" (row) toolbar button and context menu items were still enabled. This was inappropriate, and could have caused an internal error if clicked. This has been fixed; the toolbar buttons and menu items in the context menu are now properly enabled. ================(Build #4216 - Engineering Case #308031)================ As an ASE compatibility feature, ASA was zero-padding binary strings for TDS connections, (ie jConnect). Since the ASA behaviour did not match ASE behaviour, (ASA zero-padded nullable strings, whereas ASE zero-padded not null strings), and zero-padding gave the impression that a zero-padded binary value was equivelent to a non zero-padded binary value in ASA, when in reality it was not, the zero-padding feature has now been removed. ASA will no longer zero-pad binary for a TDS connection. ================(Build #4223 - Engineering Case #310887)================ DBISQL would have reported an internal error, if it was opened from Sybase Central, (Right-click on the database icon and click "Open Interactive SQL"), and a number of statements were executed all at once, followed by an EXIT statement. For example: CREATE VARIABLE value INT; SET value = 1; EXIT value It did not matter what the statements did, just that there were more than one, and that the last one was an EXIT. This problem has been fixed. ================(Build #4225 - Engineering Case #311584)================ If any any of the following conditions were true, dbisql, (or any of the administration tools), could have failed to connect to a database: - the "Connect" dialog was being used - the JDBC-ODBC bridge was being used - a value in the "Start line" field contained a blank. The exact error message varied, depending on what other connection parameters were specified and whether the database server was already running or not. This problem has been fixed. A workaround is to connect using the jConnect driver instead of the JDBC-ODBC bridge. Note, this was a problem in the administration tools, not the JDBC-ODBC bridge per-se. ================(Build #4225 - Engineering Case #311704)================ When editing table data in the "Results" panel of DBISQL an internal error could have been reported if an existing cell was being edited and an invalid value for the cell was entered, or a new row was added and invalid data was entered in one or more of the cells, and then a different row was selected by clicking with the mouse or by pressing the UP or DOWN keys. An error message about the invalid data would have ben displayed, and the row selection would change. Attempting to go back to the row with the bad data and correct it would then have caused an internal error. This problem has been fixed. Note, this problem also applied to the ASA plug-in for Sybase Central. ================(Build #4230 - Engineering Case #311508)================ Binary data imported from an ASCII formatted file would not have been loaded correctly if the data appeared as an unquoted sequence of hex digits, prefixed by "0x". (This is the format generated by DBUNLOAD and DBISQL's OUTPUT statment.) This has now been fixed. ================(Build #4239 - Engineering Case #315262)================ When opening a query in dbisql, parts of some of the query may have had the quotes stripped off. The query editor's parser was being too agressive when parsing parts of a SQL statement. This is now fixed. ================(Build #4239 - Engineering Case #315415)================ When attempting to reload a database with dbisqlc, it could have failed with an error that it could not open a data file that was greater than 2GB in size. This problem has been corrected. A workaround is to use dbisql (Java version); however, dbisql is not available on deployment platforms. ================(Build #4240 - Engineering Case #309620)================ If a file selected via the "File/Run Script" menu item, was in a directory starting with the letter "n" (e.g. "c:\new\test.sql"), and the platform was Windows, a file not found error would have occurred. This has now been fixed. ================(Build #4240 - Engineering Case #312950)================ The following problems, all related to the way DBISQL handled the DBKEY connection parameter, have been fixed. - DBKEY values which contained number sign ('#') characters were being mangled. This would have prevented connecting to an encrypted database. - if the DBKEY parameter was specified on the DBISQL command line, but there was not enough information to connect, the Connect dialog was opened, but the Encryption Key field was not filled in. Instead, the DBKEY value appeared in the Advanced Parameters field. ================(Build #4246 - Engineering Case #317112)================ The QueryEditor was not qualifying tables with the owner name, which lead to problems when there were multiple tables with the same name. Now it uses the users id if it matches one of the tables owners, otherwise it guesses and picks the last table found with a matching name. ================(Build #4246 - Engineering Case #317268)================ The QueryEditor was not parsing the ORDER BY clause correctly,if the query had a HAVING clause. This is now fixed. ================(Build #4248 - Engineering Case #317638)================ The reload.sql script created by dbunload was not quoting user names that apppeared in CREATE SYNCHRONIZATION USER statements, causing a rebuild to fail if the username contained spaces or consisted of numbers only. This has been fixed. ================(Build #4249 - Engineering Case #317930)================ The Query Editor was producing bad SQL when given a query of the form: SELECT * FROM a join b, (c join d ) join e The parser was not processing the comma properly when it was followed by a bracket. This has now been fixed. ================(Build #4250 - Engineering Case #317962)================ The UNCONDITIONALLY keyword of the STOP ENGINE statement was not being handled correctly by dbisql. When executing a STOP ENGINE statement, a STOP ENGINE UNCONDITIONALLY statement was actually sent to the database server, and when executing STOP ENGINE UNCONDITIONALLY, a STOP ENGINE statement was sent to the database. This has now been fixed. ================(Build #4250 - Engineering Case #318315)================ After connecting using jConnect, attempting another connection to a different server would have failed, if a different port was used. This problem is now fixed. ================(Build #4251 - Engineering Case #318320)================ Viewing data from a proxy table which referenced a table which no longer existed, would have caused dbisql to report an internal error. This problem appeared only when connecting using the ASA JDBC-ODBC bridge. Note, this same problem affected the "Data" details panel in the Sybase Central ASA plug-in as well. Both are now fixed. ================(Build #4254 - Engineering Case #319165)================ Updating VARBINARY and LONG BINARY values in the Results panel of dbisql, or the Data tab of the Sybase Central Plug-in, was not being allowed. This has been fixed. As well the Table Editor is now more lenient of what can be typed in for BINARY, VAR BINARY and LONG BINARY values. The usual syntax of "0x" followed by pairs of hex values is still supported. However, anything else will now be sent to the server as a string which the server will convert into a BINARY value. ================(Build #4259 - Engineering Case #320357)================ Using the Embedded SQL syntax, the statements: EXEC SQL GET DESCRIPTOR sqlda :hostvar = DATA or EXEC SQL SET DESCRIPTOR sqlda DATA = :hostvar could have failed to copy the correct amount of data if the host variable type was DECL_DATETIME, DT_TIMESTAMP_STRUCT, DECL_LONGVARCHAR, DT_LONGVARCHAR, DECL_LONGBINARY or DT_LONGBINARY. The SQLDATETIME structure used by the TIMESTAMP_STRUCT structure is 14 bytes on platforms which do not require alignment, and 16 bytes on those that do. Code with the length of the structure appropriate for the current machine was being generated by sqlpp. Now sizeof(SQLDATETIME) is used in the generated code instead. ================(Build #4261 - Engineering Case #320708)================ The QueryEditor and the Expression Editor did not fit on the screen when the resolution was set to 800x600. These windows have been resized to fit an 800x600 screen. ================(Build #4263 - Engineering Case #320912)================ Computed columns that only consisted of "owner"."table"."column" were being truncated to just "column" in the Query Editor. This problem has been fixed. ================(Build #4263 - Engineering Case #320929)================ An internal error would have been reported if: - dbisql was running on a Windows operating system which was configured to use a multi-byte character set (MBCS), such as Japanese or Chinese, and - an OUTPUT TO ... FORMAT EXCEL statement was executed, and - an exported string, which was less than 255 characters, had a MBCS encoding which was greater than 255 bytes. This problem has been fixed. ================(Build #4263 - Engineering Case #320960)================ It was not possible to open the Expression Editor to edit an ON condition using the keyboard, it required double-clicking the cell with the right mouse button. It was possible to TAB to the cell, but the keystrokes for editing (F2 or space) were being ignored. This is now fixed. ================(Build #4268 - Engineering Case #321611)================ If when using the QueryEditor to create a derived table, a column was aliased with a reserved word (eg "from"), the generated SQL did not quote the alias in the list of columns for the derived table. This has been fixed so that now it does. ================(Build #4269 - Engineering Case #321834)================ When a START ENGINE statement was executed in dbisql, the quotation marks from the engine name parameter was not stripped off. For example, the following statement would start an engine called 'Test' rather than Test. START ENGINE AS 'Test' Now, the quotation marks do not appear as part of the started engine's name. ================(Build #4272 - Engineering Case #322326)================ When connected to a database which used the Turkish (1254TRK) collation, DBISQL exhibited a number of problems. These have been fixed, and are listed below: - If the server was started with the "-z" option, and the connection was via jConnect, debugging information from DBISQL was displayed in the server window. (It shouldn't be.) - Connecting to an authenticated 1254TRK database was not possible. - If connecting via jConnect, DATE, TIME, and TIMESTAMP column types were all displayed as TIMESTAMP and were not in the appropriate format. - The list of options listed by the SET command was incomplete ================(Build #4273 - Engineering Case #322363)================ Lists of objects were not being sorted according to the rules for the current locale. Now they are. The affected lists were: - The list of tables in the "Lookup Table Name" dialog - The list of columns in the "Select Column" dialog - The list of procedures in the "Lookup Procedure Name" dialog. - The list of options displayed by the SET command - The combo box which contained the list of columns in the Import wizard - The list of database servers in the "Find Servers" window (opened from the "Connect" dialog) - The list of ODBC data sources in "Data Source Names" window (opened from the "Connect" dialog) ================(Build #4273 - Engineering Case #322449)================ When dbisql was run in console mode, (ie -nogui), the option Truncation_length was being ignored. This has been fixed. ================(Build #4276 - Engineering Case #323206)================ When an off-line transaction log directory was not specified, log scanning tools on CE would have failed to find the off-line logs if they were in the root directory. This problem has been fixed. ================(Build #4277 - Engineering Case #323519)================ If the definition of a procedure, trigger, view or event exceeded 512 characters and the definition contained a right brace ("}"), the preserved-format source would have been truncated without warning or error by the dbunload utility. The complete definition will now be output. ================(Build #4279 - Engineering Case #322435)================ Running dbisqlc in quiet mode, (ie with -q option), could have caused it to crash when it was attempting to generate an error dialog. This has been fixed. ================(Build #4279 - Engineering Case #323981)================ Unloading a database with the -ar or -an command line options on dbunload could have resulted in a new database being created containing mangled data and object names. For this to have occurred, the operating system character set must be different from the database character set on the machine where the unload was being performed. These dbunload options are used to simply make a new database with all of the same options as the original database. As a result, the fix is to no longer do character set translation when these switches are used. ================(Build #4279 - Engineering Case #324235)================ If a database which had no user DBA (i.e. a REVOKE CONNECT FROM DBA had been done) was unloaded and reloaded using dbunload with the -ar or -an command line option, or the Sybase Central Unload wizard with a new database file specified, then the new database would have had a user DBA and the user that had been used to do the unload would have had the password SQL. This is now fixed. ================(Build #4284 - Engineering Case #324989)================ Starting dbisqlc on a Windows machine with a connection string that specified a character set different from the OS character set (e.g. "cs=cp1251"), would have caused it to crash on shutdown. This is now fixed. Note, any executable that used the Unicode translation library, (dbunic9.dll on 9.0.0 or libunic.dll otherwise), and which also loaded and unloaded the DBLIB or ODBC client libraries could have encountered this problem. ================(Build #4286 - Engineering Case #325032)================ When run on Windows machines, certain graphical objects could have been inadvertently displayed underneath the Windows task bar. Note that this problem was also present in Sybase Central, the Database Object Debugger, and DBConsole. These objects included: - The splash window - Context menus - Property sheets, dialogs, wizards - the editor window for stored procedures and dialogs opened from the editor The problem was especially noticeable if the taskbar was docked to the left or top edge of the screen. This has been fixed. ================(Build #4287 - Engineering Case #325734)================ The QueryEditor keeps a statement open so that sample results can be displayed. As the query is changed the statement is closed, recreated, and executed. The statement was being left open, leaving the table locked. Now, when the QueryEditor's dialog has been closed the statement is also closed. ================(Build #4289 - Engineering Case #325668)================ The dbunload utility was not adding the CLUSTERED keyword to the CREATE INDEX statement in the reload.sql file for clustered indexes, clustered primary keys, and clustered foreign keys. This has been fixed. ================(Build #4289 - Engineering Case #326072)================ If a database which had no user DBA (i.e. a REVOKE CONNECT FROM DBA had been done) was unloaded and reloaded on Unix using: - dbunload -ar or -an or - the Sybase Central Unload wizard and a new database file was specified then the new database would have had a user DBA and the userid used to do the unload would have had the password SQL. With builds 7.0.4.3469, 8.0.1.3121 or 8.0.2.4279 higher, the error "Invalid user ID or password" would be displayed. Earlier builds did not display any error. This has now been fixed. ================(Build #4294 - Engineering Case #320085)================ Attempting to run dbisql -nogui on Unix platforms not running X, would have failed with an internal error. This has been fixed, dbisql -nogui can now be run without the need for an X server. ================(Build #4300 - Engineering Case #323132)================ If dbisqlc cannot finds it's component dlls in the current directory or by searching the path, it will access the registry to find the ASA installation directory. It was accessing the registry with KEY_ALL_ACCESS permission, which may have caused access errors. Now KEY_QUERY_VALUE is used. ================(Build #4303 - Engineering Case #326406)================ Rebuilding a 5.x database, using either dbunload or Sybase Central, could have failed with a syntax error, if the option Non_keywords was set. This has been fixed. ================(Build #4303 - Engineering Case #328376)================ DBISQL could have reported an internal error if there was more than one DBISQL window open, and one of the windows was closed by clicking its close icon in the title bar, while DBISQL was executing a statement, but was blocked. This is now fixed. ================(Build #4305 - Engineering Case #326388)================ If the command delimiter option was set to something other than the default, and the delimiter appeared in a quoted filename, the filename would have been truncated. Quoted filenames are used in the following statements: INPUT, OUTPUT, READ, START DATABASE, START LOGGING, and STOP DATABASE. This has been fixed. The workaround for this problem is to not change the command delimiter option. ================(Build #4307 - Engineering Case #330440)================ Under certain circumstances, dbisqlc could have crashed when run on HP-UX on Itanium. For example: if the ESC key was pressed while in the Connection dialog box. This has been fixed. ================(Build #4309 - Engineering Case #325029)================ When run on AIX machines with the Power4 processor, shared memory applications could have been disconnected from the server unexpectedly. The Power4 chip has a weak-memory ordering architecture. This fix puts the required memory barrier instructions at proper places in the shared memory communication protocol. Workaround: The bindprocessor command can be used to bind both the client and the server to the same CPU. ================(Build #4309 - Engineering Case #330648)================ Sybase Central could have crashed when unloading a database directly into a new database if an error occurred while reloading the data. The dbunload utility with the -an parameter would have reported an error at the point that Sybase Central crashed. This has been fixed so that Sybase Central now reports the error and no longer crashes. ================(Build #4313 - Engineering Case #331826)================ Attempting to execute an INPUT statement with a "FORMAT SQL" clause, without having previously executed a statement which returned a result set, would have caused dbisql to have reported an internal error. This has been fixed to now report an error message. In a related problem, if an INPUT statement did not include a table name, and the file format was not "SQL", an error message should have been displayed but was not. Now, the error message is properly displayed. ================(Build #4316 - Engineering Case #332861)================ Attempting to upgrade a database having a page size of 32K would fail with the error "Value 32768 out of range for destination". This has been fixed. ================(Build #4324 - Engineering Case #333869)================ Running dbunload -ar could have failed to replace user dbspaces when creating the replacement database. This would only have occurred if the path stored in the SYSFILE table for the location of the dbspace was not hard-coded, (ie 'dbspace1.db' instead of 'c:\database\dbspace1.db') and dbunload was started in a directory other than the one where the database was located. This isnow fixed and dbunload -ar can be run from any directory on the local machine when using dbspaces. ================(Build #4324 - Engineering Case #334353)================ The sqlpp parser supported only one of the two ways that table hints can be specified. The following syntax would have worked: SELECT * FROM T WITH table-hint while the following syntax with brackets would have caused a syntax error: SELECT * FROM T WITH ( table-hint ) Both syntaxes are now supported. ================(Build #4325 - Engineering Case #332306)================ Using the dbdsn utility to create or delete data sources on UNIX would not have updated the [ODBC Data Sources] section of the .odbc.ini file. This feature has now been added. A work-around is to edit the .odbc.ini file directly and add the appropriate information into the [ODBC Data Sources] section, or to use a third party driver manager tool for maintaining the file. ================(Build #4326 - Engineering Case #334802)================ The QueryEditor would have failed to parse a query if it had table or column names that contained characters that fell into the Unicode private use category (General category "Co" in the Unicode specification), as Java does not consider these characters to be part of an identifier. This has been fix, the QueryEditor's parser will now accept these characters as valid. ================(Build #4327 - Engineering Case #334914)================ If the user name 'DBA' had been removed from the database, and the database option "Quoted_Identifier" was set to 'OFF', then the dbunload, dbxtract or mlxtract utilities used to generate a reload.sql file would have failed. This is now fixed. ================(Build #4327 - Engineering Case #334960)================ The "preview" table in the Import Wizard would not have shown any data, and no data would have been imported at all, if: - an ASCII file was being imported. and - the wizard was to create a new table for the data, and - the file started with an empty line. This has been fixed. ================(Build #4328 - Engineering Case #332139)================ The INPUT statement would have failed to import any data if the FORMAT ASCII clause was specified, the input file did not contain values for all of the columns listed in the INPUT statement, and one of the omitted columns was of type BINARY, VARBINARY, or LONG BINARY. This has been fixed. ================(Build #4328 - Engineering Case #332475)================ The START DATABASE statement would have failed with a syntax error if the database name was in quotation marks and started with a hyphen, e.g.: START DATABASE 'mydb.db' AS "-myName" This was a specific instance of the way quoted identifiers were handled by dbisql in general. Dbisql had required that all characters in any quoted identifier had to be alphabetic or numeric. This was an incorrect requirement (any character should valid) and has been fixed. In a related issue, the STOP DATABASE statement did not work if the database name contained a hyphen. This has also been fixed. ================(Build #4330 - Engineering Case #335093)================ The clauses FOR READ ONLY and WITH TRUNCATE AT CHECKPOINT were added to the START DATABASE statement in version 8.0.2, but they were not being handled properly. Support for these clauses has now been added to dbisql, (and dbisqlc). Note that these clauses cannont be used if the ON ENGINE clause is also specified. ================(Build #4330 - Engineering Case #335745)================ The Import wizard would not have imported all of the columns of a file, if: - an ASCII file was being imported. and - the wizard was to create a new table for the data, and - the data on the first line of the file ended with a NULL value. The symptoms of this problem were that the "Preview" table in the Import wizard did not display all of the columns in the file, and after clicking the "Finish" button, the new table would contain all but the last column. This is now fixed. ================(Build #4331 - Engineering Case #335803)================ The INPUT statement was not able to add data to temporary tables. This has been fixed so that now it can. ================(Build #4331 - Engineering Case #335977)================ When having the Import wizard create a new table, if any of the columns specified were of the types BIGINT, SMALLINT, TINYINT, NUMERIC or REAL, the columns would have been created as a type of VARCHAR instead. This problem has been fixed. ================(Build #4333 - Engineering Case #336563)================ If the parameters DBF, DBN, DBS or ENG were set in the SQLCONNECT environment variable, dbspawn could have failed unexpectedly to start the server. These parameters were added to the command line of the spawned server. For example, if SQLCONNECT was set to DBF=asademo.db and "dbspawn dbeng8 asademo.db" was run, an error would occur. This has been fixed so that the SQLCONNECT environment variable no longer affects dbspawn. ================(Build #4333 - Engineering Case #336573)================ The dbunload utility was checking the validity of dbmlsync extended option names and option values, while the server was not. This made it problematic when unloading a database that contained invalid options names or option values. The fix was to relax the unload process to not check for valid option name and values. ================(Build #4336 - Engineering Case #336506)================ Running dbunload with the -ar command line option, ('rebuild and replace database'), would have caused the server to fail with Assertion 303000: 'Stopping JVM while forbidding and there are active java threads', if the database was Java enabled. Dbunload issues a "stop database" request, which attempts to drop all connections. The assertion occurred as to the JavaVM was not stopped prior to dropping the connection it was running on. This is now fixed, the VM is stopped prior to dropping the connection. ================(Build #4336 - Engineering Case #337632)================ The "Copy" action on the context menu for results tables did not treat Unicode "private use" characters properly; they were converted to a Unicode escape sequence of the form "\uXXXX" where XXXX was a 4 digit hex number. Now private use characters are copied as-is. ================(Build #4337 - Engineering Case #337583)================ Running dbunload, and specifying an external unload, (ie with command line options -xi or -xx), would have caused a value of 0x to be written to the data file for empty not null binary columns. This has been fixed by writing two quotes, like for char columns. ================(Build #4337 - Engineering Case #337764)================ When running dbunload, if the client's charset on the unloading connection did not match the code page of the machine, the unload may have generated invalid SQL for the dbmlsync extended options. THis hasnow been fixed. ================(Build #4337 - Engineering Case #337913)================ When attempting to export data to an HTML file, any character which could not be displayed in the operating system's code page, would been written as a question mark. This has now been fixed. ================(Build #4340 - Engineering Case #334469)================ When attempting to import a FOXPRO formatted file, which used a memo file (.FPT), dbisql would either have failed with an "OutOfMemoryError" exception or would have used incorrect data. The file would have been processed correctly only if the internal block size used by the memo file was 64. This has been fixed. ================(Build #4346 - Engineering Case #340047)================ When the SQLCONNECT environment variable was set, its parameters would have overridden parameters in the connection string (specified using -c). This has been fixed, the parameters in the connection string now have precedence. ================(Build #4348 - Engineering Case #340813)================ If a table or column name contained the percent character "%", the LOAD TABLE statement in the reload.sql may have been incorrect. There was also a chance that the dbunload utility could have crashed. This has been fixed. ================(Build #4349 - Engineering Case #340693)================ If focus was not in the SQL Statements window, then after using the "Go To" dialog, the focus would appear to be in the SQL Statements field, but characters typed would not be displayed in the field until it was clicked. This has been fixed, focus will now be in the SQL Statements window after using "Go To". ================(Build #4349 - Engineering Case #340797)================ Some connection parameter values from the dbisqlc connection dialog were being missed, including the CommLinks parameter. This would have caused connections to a remote server initiated via the connection dialog to fail. No -c command line option connection parameter were ignored, nor were those from the CONNECT USING statement. Connection parameters other than the following were ignored by the connection dialog: UID, PWD, CON, DBN, DBF, DBS, ENG, START, AUTOSTOP, INTEGRATED, DSN. This problem has been fixed. ================(Build #4350 - Engineering Case #340919)================ After disconnecting, clicking the Connect menu item to bring up the Connect dialog would have had the fields populated with all of the connection information used by the previous connection, including the password. Now, the password field is left blank. ================(Build #4350 - Engineering Case #340964)================ When saving the graphical plan for a statement which contained one or more backslash characters, the plan details (in the right pane on the "Plan" tab), did not show the correct SQL -- double backslashes in the original SQL were shown collapsed into a single backslash. For example, the plan for: SELECT '\\' was shown in the plan as: SELECT '\' This has been fixed. ================(Build #4352 - Engineering Case #341123)================ Attempting to update or delete rows from a table, when another user had locked the table, would have caused dbisql to hang. Now, an error dialog is displayed that shows which user has the lock. ================(Build #4355 - Engineering Case #341718)================ If the INPUT INTO statement is run with a FORMAT clause and the table does not exist, for some formats a table is created prior to loading the date. When executed via DBISQLC, the CREATE TABLE statement generated would have failed with a syntax error, if the language setting for ASA was anything other than EN (english). This has been fixed. Note, this problem did not happen with DBISQL. ================(Build #4359 - Engineering Case #339759)================ When connnecting to a database which had a custom login procedure that set temporary user settings for the following options: Allow_nulls_by_default Ansi_blanks Ansinull Automatic_timestamp Chained Close_on_endtrans Date_format Date_order Escape_character Float_as_double Isolation_level On_tsql_error Time_format Timestamp_format Tsql_variables the values for these options would have been temporarily reset to their defaults setting in DBISQL. Now, temporary settings for these options are not reset if a custom login procedure is enabled. ================(Build #4361 - Engineering Case #342929)================ An internal error (ArrayIndexOutOfBoundsException) would have been reported when setting column breaks in the Import wizard, if the wizard was to create a new table for the data. This has now been fixed. ================(Build #4364 - Engineering Case #343613)================ When using the Data Import wizard to import data into an existing table, an exception could have occurred when selecting a new column in the combobox on page 4 of the wizard. This has been fixed ================(Build #4365 - Engineering Case #343686)================ Starting with version 8.0.0, it was not possible to connect to a database using a userid which had an empty string for a password, when using jConnect and the "Connect" dialog to specify the connection parameters. This was a bug, and has been fixed. This problem affected only jConnect connections. A workaround is to use the iAnywhere JDBC Driver which did not suffer from this restriction. Note, this restriction affects the ASA and Mobilink plug-ins for Sybase Central, dbconsole, and dbprdbg as well. ================(Build #4379 - Engineering Case #345634)================ If the server issued an error message in response to committing changes, the error message would not be displayed if the commit was a side-effect of shutting down DBISQL. This situation could occur if the dbisql option Wait_for_commit was 'On'. Now the message is always displayed. ================(Build #4379 - Engineering Case #346263)================ The following problems could have been seen when launching or running the graphical administration tools (ie, Sybase Central, DBISQL, DBConsole, MobiLink Monitor) 1. A crash on startup -- The Java VM may have reported that an exception occurred in the video card driver. 2. Painting problems -- On Windows XP, the task switcher that comes with Windows XP Powertoys caused the administration tools to paint incorrectly when switching through the list of tasks. These problems have been fixed, but a workaround is to disable the computer's use of DirectDraw and Direct3D acceleration. ================(Build #4385 - Engineering Case #348793)================ It was possible to edit the result set of a query, even though some, or all, of the primary keys were not included in the result set. Now, the result set can only be edited if all of the primary key columns are included, or the table has no primary key. These conditions have been added in addition to the existing conditions; that columns must all come from one table, and no Java columns are included. Updating rows without the entire primary key being in the result set, could have inadvertently modified or deleted more than one row. Some examples, using the sample database (ASADemo): 1. SELECT * FROM customer The query include all primary key columns from the "customer" table, so the results are editable. 2. SELECT year, quarter FROM fin_data The query does not include all of the primary key columns ("code" is missing), so the results are not editable. ================(Build #4389 - Engineering Case #348348)================ If the isql option ON_ERROR was set to EXIT, an "Out of Memory" exception could have been reported when attempting to display a long binary column when in console mode. This has been fixed. ================(Build #4389 - Engineering Case #350823)================ The Database Unload and Database Extract utilities dbinload and dbxtract, did not recognize temporary tables and avoid generating LOAD TABLE statement for them. The change for Engineering Case 347825 was resulting in an error, when rebuilding a database containing a Global Temporary table if it was created with the ON COMMIT DELETE ROWS clause. Both utilities now avoid generating LOAD TABLE statement for Global Temporary tables. ================(Build #4392 - Engineering Case #313786)================ The Database Initialization utility dbinit, could have failed if the SQLCONNECT environment variable specified a database file name (DBN). This has been fixed so that the SQLCONNECT environment variable does not affect dbinit. ================(Build #4392 - Engineering Case #348115)================ If the Database Unload utility dbunload was run with the -ar command line option (rebuild and replace database), using a database that had already been started on a database server, it may have failed to rebuild the database. The original database would have been deleted and the rebuilt database and log file would still have an extra "R" at the end of the filename. The log offset values would not have been reset to the values in the original database, although the data in the rebuilt database would have been identical to the original database. This has now been fixed. ================(Build #4392 - Engineering Case #349182)================ If the Transaction Log utility dblog was run with the -il, -ir, -is, -x or -z command line options, or the Database Unload utility dbunload was run with the -ar command line option, they may have crashed and left the database in a state such that it could no longer be started. The server would have reported that the database had been used more recently than the log file and failed to start. These utilities have now been fixed. ================(Build #4397 - Engineering Case #350188)================ If a database created using SQL Anywhere 5.5 included tables and procedures used for jConnect, these tables and procedures would have been included in the reload.sql script generated by the Database Unload utility dbunload. These objects will now be excluded from the reload script. Note, that upgrading a 5.5 database using the Database Upgrade utility causes the jConnect objects to be replaced with ones owned by dbo, so an upgraded database does not have this problem. ================(Build #4402 - Engineering Case #351394)================ If a query had duplicate ORDER BY items, opening it in the Query Editor would have caused its parser to generate an error. For example: SELECT emp_fname, emp_lname FROM employee ORDER BY emp_fname, emp_fname SELECT emp_fname, emp_lname FROM employee ORDER BY 1, 1 This has now been fixed, the duplicate ORDER BY item will be ignored by the Query Editor's parser. ================(Build #4413 - Engineering Case #353335)================ When a "rollback to savepoint" statement was executed, the table operations prior to the execution of the "savepoint" statement may not have been translated by the Log Translation utility dbtran. This would have occurred if the rollback operations had any trigger actions and the dbtran command line option -t was not used. This problem is now fixed. ================(Build #4417 - Engineering Case #354337)================ An internal error (IllegalArgumentException) could have been reported by dbisql, when an attempt was made to edit the result set of a stored procedure. The result set should not have been editable in the first place. This has now been corrected. This problem would only have occurred when connecting using the iAnywhere JDBC Driver. ================(Build #4422 - Engineering Case #354617)================ If dbisql reported an internal error, the password used in the current connection (if any) was shown in clear text in the error details. It has now been replaced by three asterisks. Note that passwords given as part of a "-c" command line option are still displayed in clear text in the error details. ================(Build #4426 - Engineering Case #355787)================ An internal error could have been reported in response to pressing the DELETE key when an uneditable result set was displayed in the "Results" panel and the results table had the focus. This has been fixed. ================(Build #4435 - Engineering Case #358151)================ The Interactive SQL utility dbisqlc, did not display help when the "Help Topics" menu was selected. This has been fixed. ================(Build #4441 - Engineering Case #359828)================ When the Histogram utility dbhist, was run on non-English systems, mangled characters would have been shown in the title, legend, etc, of the generated Excel chart. This problem has now been corrected. ================(Build #4441 - Engineering Case #360001)================ The context menu for Results tables could have appeared far from the mouse pointer if the whitespace to the right or below the actual table data was clicked on. This has been fixed so that the context menu always appears where the mouse was clicked. ================(Build #4447 - Engineering Case #361206)================ When run on Unix systems, the Data Source utility dbdsn, required write permission on the .odbc.ini file, even if just listing or reading the DSNs. This has been fixed, now only read permission is required, unless the -d or -w options are used. ================(Build #4448 - Engineering Case #361599)================ Executing a STOP DATABASE statement which attempted to stop a database running on a server to which you were not currently connected, would have resulted in dbisql failing with an internal error. This has been fixed. ================(Build #4453 - Engineering Case #362497)================ The OUTPUT statement could have failed to write any rows to a file, even if there were rows to write, if the "Output_format" option was set to an invalid value. Now, it is impossible to set the "Output_format" option to an invalid value. When connecting to a database in which the option has been set to a bad value, the bad value is ignored and the default (ASCII) is assumed. ================(Build #4471 - Engineering Case #365940)================ If the trantest sample application (PerformanceTransaction), was executed with -a odbc -n <threadcount> and the thread count was higher than one it may have crashed in NTDLL.DLL. This has been fixed. ================(Build #4486 - Engineering Case #369491)================ When running on Unix systems, the Interactive SQL utility dbisql, would have displayed the usage message when a full path to a SQL script file was given. The leading '/' was was being interpreted as a command line switch on. This has been fixed. ================(Build #4492 - Engineering Case #370567)================ The Unload utility dbunload, may have crashed if the command line option -ar (rebuild and replace database) was used with a database that had no online transaction log. This problem has been fixed. ================(Build #4493 - Engineering Case #370724)================ The Unload utility dbunload, would have silently placed old transaction log files into the root directory, when the command line option -ar (rebuild and replace database) was used and no log directory was specified, for databases that were involved in synchronization/replication using RepAgent. Now, if this situation occurs, the old transaction log file will be placed in the log directory of the database.

MobiLink - ASA Client

================(Build #4076 - Engineering Case #293340)================ On case sensitive databases, it was possible that the Mobilink Plugin would insert the incorrect password into the ml_user table. This has now been fixed. ================(Build #4079 - Engineering Case #300404)================ Specifying -mn "" on the dbmlsync commmand line would have caused it to crash. This has been fixed. ================(Build #4083 - Engineering Case #301293)================ A MobiLink client on a Pocket PC 2002 device, using ActiveSync synchronization over an ethernet connection, would have failed to find the ActiveSync provider on the desktop. This is now fixed. ================(Build #4085 - Engineering Case #301415)================ When -d is specified on the dbmlsync command line, dbmlsync attempts to drop any connections that are preventing it from locking tables for synchronization. If the database engine was slow dropping the connections, synchronization would fail with a message like: SQL statement failed: (-210) User '<username>' has the row in '<tablename>' locked In this situation dbmlsync now tries for longer than it did in the past so failures of this type should be much more infrequent. ================(Build #4087 - Engineering Case #296325)================ When dbmlsync is sleeping, if its top-level window receives a window message, registered using the name "dbas_synchronize", will wakeup and perform a synchronization. If dbmlsync is already performing a synchronization, the message will be ignored. This feature has been available on CE platforms since version 8.0.0, now it is available for all win32 platforms. ================(Build #4087 - Engineering Case #302304)================ A new feature has been added such that when the dbmlsync top-level window receives a window message registered using the name "dbas_synchronize" while sleeping, it will weakup and perform a synchronization. If dbmlsync is already performing synchronization, the message will be ignored. ================(Build #4088 - Engineering Case #302224)================ Dbmlsync was leaking TLS indexes and memory on the first failed MobiLink connection attempt. The leak did not grow for subsequent connection failures throughout the process. This is now fixed. ================(Build #4088 - Engineering Case #302400)================ A bug has been fixed that could have caused any of the following problems with dbmlsync when running on Windows CE: 1) Crashes 2) Hanging 3) failure to add messages to the message log ================(Build #4092 - Engineering Case #303141)================ When dbmlsync was run using the DBSynchronizeLog entry point in the dbtools DLL, a crash could have resulted if an 8.0.2 or later version of the dbtool8.dll was used with an older version of the a_sync_db structure. The a_sync_db structure is used to pass parameters to the DBSynchronizeLog entry point. This problem has been fixed. ================(Build #4097 - Engineering Case #303920)================ When the progress offset in the consolidated database differs from that in the remote database, the MobiLink server will send the consolidated database progress offsets to the remote and ask that it synchronize again, and then waits. However, if the requested offset was too small (old logs had been deleted), or too big (log offset had not been generated), or the offset was in the middle of a log operation, DBMLSync would display an error, ignore the synchronization request and abort the synchronization. Then the MobiLink server would generate the error "Unable to read from the 'tcpip' (or 'http') network connection". Now if DBMLsync cannot find the requested offset, it sends the MobiLink server an empty upload stream (an upload without any actually user data), plus an error message. The MobiLink server will display this error message and abort the synchronization. ================(Build #4099 - Engineering Case #304715)================ If errors occurred during upload DELETEs (for example, deleting rows that do not exist in the consolidated database) and the MobiLink server was running in a multiple-row mode (the command line switch -s X was used with X > 1 or no -s was specified), it may not have updated the progress offset in the consolidated database, but it would have informed the client to update the progress offset in the remote database. Therefore, the progress offset in the consolidated database would have been smaller than that in the remote database after the synchronization. In the next synchronization, DBMLsync would have complained with the error "mismatch progress offset" and then uploaded the transactions that have been uploaded in previous synchronization again, if all the previous transaction log files were still available. However, if "Delete_old_logs" was on in the remote database, the previous transaction log files may have been deleted, and then DBMLsync would have complained with "missing transaction log(s) before file log_file_name". These problems are now fixed. ================(Build #4106 - Engineering Case #305630)================ When run against a database initialized with a Turkish collation sequence, dbmlsync would have failed to initialize the TCPIP communication stream. The error returned would be: "Invalid communication type: 'tcpìp'". TCPIP should now initalize correctly. ================(Build #4120 - Engineering Case #306920)================ If the following conditions were all true: - the -x switch was specified on the dbmlsync command line - the progress value on the remote was behind the progress value on the consolidated - the LockTables extended option was set to 'off' then dbmlsync would have failed to generate an upload and report the following error : "No log operation at offset of n in the current transaction log" The number n would be the ending log offset of the current transaction log. This has been fixed. ================(Build #4201 - Engineering Case #305568)================ Since 8.0.0 we have shipped dbtool8.dll and dbmlsync.exe for CE. The dbtool8 DLL contained most of the logic for dbmlsync and the executable just did command line processing, then called the DLL. The dbmlsync executable is now linked against a static library containing the same code that goes into dbtool8.dll, resulting in an executable that no longer depends on the DLL and consumes about 240K less memory. The dbtool8 DLL for CE will continue to be shipped, as it is required by dbremote and can be used through the dbtools interface to programatically access dbmlsync's functionality ================(Build #4203 - Engineering Case #305469)================ In dbmlsync, when the sp_hook_dbmlsync_download_end hook was called, an extra entry with the name 'continue' was being added to the #hook_dict table. The value for this entry was alway FALSE. The entry was unintentional, undocumented and has now been removed. ================(Build #4204 - Engineering Case #305634)================ When building the upload stream dbmlsync may have displayed a message box with the caption "Assertion Failure" and the text "File 'mergeupd.c' at line #873. Try to enter debugger?", (the line number in the text of the message might have varied). This message would have been reported if the extended option SendTriggers was set to 'off' (this is the default), a row that belonged to one of the publications being synchronized was deleted, then inserted inside of a trigger then deleted again. This has now been fixed. ================(Build #4205 - Engineering Case #305093)================ Dbmlsync would have incorrectly deleted rows from the download stream which had NULL foreign key values, if all of the following were true: - table T contained a foreign key and one or more of the columns of row R involved in the FK was NULL. - another row, R2, existed in the download stream that dbmlsync had to delete, due to a legitimate RI violation, involving the same foreign key in which R had a NULL value. This behaviour has been corrected. ================(Build #4208 - Engineering Case #305784)================ When building an upload, if dbmlsync encountered a certain sequence of operations for a row being uploaded, it could have uploaded an incorrect operation on that row, created an invalid upload stream, or displayed a message box with the caption "Assertion Failure" and the text "File 'mergeupd.c' at line #873. Try to enter debugger?". The line number in the text of the message would have varied. The sequences that could have caused this problem were, (although it might not reproduce consistently): - insert a row R, stop synchronization delete, delete row R, start synchronization delete, insert a row with the same primary key as R - if the dbmlsync extended option "SendTriggers" was off, insert a row R, delete row R inside of a trigger, insert a row with the same primary key as R - if the dbmlsync extended option "SendTriggers" was off, insert a row R, update row R inside trigger so that it belonged to no publication, update row R so that it again belongs to the publication This is now fixed. ================(Build #4209 - Engineering Case #303136)================ When running on Windows CE dbmlsync would sometimes have failed a synchronization with the error message "Cannot load dbsock8.dll". Other DLL's, such as dbhttp8.dll, could also have reported as have failed to load. Once the error occurred it was likely to have occurred consistently until the device was reset. A new switch has been added to resolve this issue. The syntax of the new switch is -pd <dllname><dllname>.... For example -pd dbsock8.dll -pd dbsock8.dll;dbhttp8.dll To resolve the problem identify the communication protocols to be used by dbmlsync during this synchronization then use the -pd switch to preload the DLL's used for those protocols as follows tcpip dbsock8.dll http dbhttp8.dll https dbhttps8.dll We STRONGLY encourage everyone using dbmlsync on CE to use this switch even if they have not encountered the error. ================(Build #4221 - Engineering Case #308527)================ If a database was initialized with the blank padding option, (dbinit -b), it was impossible for dbmlsync to hover at the end of the transaction log. This has now been fixed. ================(Build #4228 - Engineering Case #312389)================ When disconnecting from a MobiLink server, the ASA client, dbmlsync, may have crashed, hung, or have issued a spurious error at the end of a synchronization. This is now fixed. ================(Build #4229 - Engineering Case #312536)================ The next available value for a GLOBAL AUTOINCREMENT column could have been set incorrectly in the following situation: - an INSERT into the table was executed using a value for the column outside the range for the current setting of Global_database_id. This could happen if rows from other databases were downloaded as part of a synchronization. - the server was shutdown abnormally (e.g. by powering off) before a checkpoint occurred. The next time the database was started, the next available value for the column would have been set incorrectly. If an INSERT was then attempted with no value provided for the column, the error "Column '<col>' in table '<table>' cannot be NULL" would have been reported. If the database was again shut down and restarted, an INSERT into the table would have attempted to use the first available value in the range for the current setting of Global_database_id. Note that if rows had been deleted from the table, this could result in a value being generated which had previously been used and which might still exist in another database. Resetting the value using sa_reset_identity() would correct the problem, assuming an appropriate value to use can be determined. This problem has now been fixed. ================(Build #4232 - Engineering Case #313503)================ When the dbmlsync command line contained a site or publication name that encoded differently in the remote database, the synchronization would have failed. The problem is now fixed. ================(Build #4232 - Engineering Case #313603)================ If a sitename contained characters from a Multi-Byte Character Set, dbmlsync would have failed to find the subscription or perhaps crashed. This problem is now fixed. ================(Build #4245 - Engineering Case #310577)================ If dbremote was running in hover mode or if dbmlsync was running on a schedule, and either process was running with the -x switch to rename and restart the transaction log, then after the log was renamed for the first time, neither dbremote nor dbmlsync would have sent changes to the consolidated database until the process was restarted. Now, if the online log is renamed when in hover-mode, the data in the last page is processed and then the log-scanning process is shutdown and restarted. ================(Build #4263 - Engineering Case #320659)================ If a remote database contains only one publication and dbmlsync is running in scheduling synchronization, dbmlsync will run in hover-mode. Whenever errors occur in an upload, dbmlsync should completely shut down the log scanning layer and restart it again. However, this would not have occurred. This problem is now fixed. ================(Build #4337 - Engineering Case #337263)================ If a publication was defined with a subset of columns and a WHERE clause, and the columns in the WHERE clause were not in the subset of columns, then updates to the columns referenced in the WHERE clause, that would cause the row to enter or leave the publication, would not have been synchronized. This has now been fixed and an INSERT or DELETE is now synchronized if the row enters or leaves the publication. ================(Build #4343 - Engineering Case #339349)================ Running the dbmlsync executable from the 8.0.2 GA release, with a dbtools library (ie dbtool8.dll on Windows) from an 8.0.2 EBF, may have caused a crash. This is now fixed. ================(Build #4356 - Engineering Case #342035)================ The MobiLink client (dbmlsync), or an UltraLite application, when running on Windows did not respect the network_leave_open=1 streams parameter. Note, this did not affect Windows CE. This is now fixed. ================(Build #4359 - Engineering Case #337411)================ Synchronizations may have failed without an error, when all of the following conditions were true: - The -n or -u options were specified on the dbmlsync commandline. - The remote database was running on CE. - Either the database collation or the operating system code page was not CP1252. Not all operating system code pages or database collations were affected by this problem, but most multibyte character sets and some single byte character sets were affected. When the synchronization failed, the dbmlysnc log would have look like the following: I. 12/18 16:05:34. Connecting to remote database I. 12/18 16:05:34. Loading synchronization information I. 12/18 16:06:00. Disconnecting from remote database In most cases, this problem occurred when the function csconvert() was unable to convert strings between the operating system charset and the database charset. Now, when the csconvert function fails dbmlsync will try several other methods to convert strings between the operating system and database charsets. If all these methods fail, a warning message will be issued and dbmlsync will attempt to continue with the synchronization based on the assumption that the publication name and user name specified on the commandline are specified in the database charset. In some cases this will be true, otherwise the synchronization will fail later, when dbmlsync is unable to find the MobiLink user, publication or subscription in the database. This problem cannot be entirely resolved, but the above changes should reduce its frequency. If synchronizations do fails with the new warning, there are some work arounds that can be tried: - Choose publication and user names so that they consist only of 7-bit ASCII characters (ASCII values 0-127) - Have the database and operating system use the same charset. The synchronization is unlikely to fail, although the warning may be issued. - In some cases the problem can be resolved by using UTF8 as the collation for the remote database. ================(Build #4360 - Engineering Case #338914)================ It was possible for a progress offset mismatch between an MobiLink client running dbmlsync and the MobiLink Server to fail to resolve itself if all of the following were true: - Two publications existed on the remote database. - One publication was in synch. - The second publication had a progress value on the consolidated that was LESS than the progress value on the remote. - Only the second publication was being synchronized. - The -ra option was specified on the dbmlsync command line. although this has now been fixed, a workaround is to synchronize both publications together. ================(Build #4366 - Engineering Case #342990)================ If two tables had primary keys that included a signed bigint column and dbmlsync scanned operations in a single run on these two tables, where the values for the primary key were identical, it was then possible, (although rare), to lose or mangle operations. When this situation occurred, the two operations would have been interpreted as occuring on the same table, instead of different tables, thus causing the two operations to be merged into a single operation. This has now been fixed. ================(Build #4368 - Engineering Case #344169)================ The MobiLink ASA client, dbmlsync, and the Log Transfer Manager for ASA, dbltm, may have crashed, if a transaction spanned multiple transaction logs. This has been fixed. ================(Build #4369 - Engineering Case #339940)================ The MobiLink ASA Client DBMLSync, and SQL Remote may have deleted old transaction log files that were needed for synchronization. Now, instead of deleting the old transaction log files, a warning will be issued if the database truncation offset is greater than the minimum value of progress offsets from SYSSYNC or the confirm_sent from SYSREMOTEUSER. This warning message will have a prefix of "I." for 802 and "W." for all other versions. ================(Build #4369 - Engineering Case #347910)================ When run on Windows CE platforms, dbmlsync would have ignored the trusted_certificates synchronization parameter used to specify trusted root certificates for TLS synchronization. This has been fixed. ================(Build #4388 - Engineering Case #348071)================ The synchronization client Dbmlsync, would have used the wrong last download timestamp for a synchronization, possibly resulting in a remote not getting download data that it should have recieved when all of the following were true: - dbmlsync was being run so that the same subscription was synchronized repeatedly within the same run. This could occur if scheduling options were specified or if the restart parameter in the sp_hook_dbmlsync_end hook were being used. - hovering was disabled. (ie the -p commandline option was used). - an error occurred late in the download phase of the synchronization. The error would have had to occur in the sp_hook_download_end hook or later but before the download was committed. In this case, if the next synchronization of the subscription occurred without shutting dbmlsync down, the last download time used would have indicated that the previous failed synchronization had a successful download, even though the download failed and was rolled back. This would have resulted in the remote not receiving data it required if timestamp based downloads were being used. This has been fix, but should not have caused problems for systems using snapshot download. ================(Build #4398 - Engineering Case #350374)================ If the Synchronization Client dbmlsync, was forced to do Referential Integrity (RI) resolution after applying the download stream, and the parent table had been empty, then every row in the child table would have been erased, even those where there were NULL values in the referencing column(s) of the child table. Now, these rows are no longer erased during RI resolution. ================(Build #4403 - Engineering Case #351614)================ When the Synchronization client dbmlsync was running in the scheduling mode, and the command line option, -p (disable logscan polling) was used, it may have taken longer and longer to complete each synchronization cycle. This would have occurred even if the upload and download data remained the same for each cycle, as the transaction log would have grown. If the command line option -x (rename and restart the transaction log) was also used, and the database option Delete_old_logs was set to ON in the remote database, dbmlsSync could complain with, "Missing transaction log(s) before file ...". This problem is now fixed. ================(Build #4413 - Engineering Case #353294)================ When the Synchronization Client dbmlsync shut down, it was possible for the database server to have reported that it had terminated abnormally. The client will now gracefully disconnect from the server on shutdown. ================(Build #4413 - Engineering Case #353465)================ When a "rollback to savepoint" statement was executed on a remote database, the table operations prior to the executed of the "savepoint" statement may not have been uploaded. This would have occurred if the rollback operations had: - table operations that were not involved in synchronization, or - global temporary table operations, or - trigger actions that modified synchronization tables, but trigger actions were not requested to be uploaded, or - trigger actions that modified tables that were not included in any synchronization publications; or - rows that were deleted after "stop synchronization delete". This problem is now fixed. ================(Build #4423 - Engineering Case #346769)================ If the Synchronization client dbmlsync was set to synchronize on a schedule, and the MobiLink server was shut down when the upload stream was being sent and then started up again, dbmlsync could have ontinuously failed to synchronize until it was shut down and restarted. The MobiLink server would simple have reported "Synchronization Failed", with no more information. This has now been fixed. ================(Build #4429 - Engineering Case #357701)================ Synchronizing to an ASA remote database using the UTF8 collation could fail with errors or put corrupted data into the database. The same problem would affect any application using ODBC or OLEDB, including Java-based applications using the JDBC-ODBC bridge (8.0) or iAnywhere JDBC Driver (9.0), including DBISQL and Sybase Central. The bug was introduced in the following versions and builds: 8.0.2 build 4409 9.0.0 build 1302 9.0.1 build 1852 This problem has been fixed. ================(Build #4442 - Engineering Case #360258)================ The total accumulated delay caused by the sp_hook_dbmlsync_delay hook was being calculated incorrectly when a synchronization was restarted using the sp_hook_dbmlsync_end hook. As a result the sp_hook_dbmlsync_delay hook might not be called or the delay produced by the hook might be shorter than specified. Following are the specific conditions required to see this problem: - Both an sp_hook_dbmlsync_end hook and an sp_hook_dbmlsync_delay hook have been coded. - During a synchronization the delay hook was called one or more times. Those calls resulted in a total delay D and the maximum accumulated delay parameter was set to some value M. - When the end hook is called it sets the 'restart' parameter to 'sync' or 'true' to restart the synchronization. When the above conditions are met, the sum of delays caused by the delay hook was not being reset before the synchronization was restarted. As a result, on the restarted synchronization, the delay hook would not be called if D >= M. If D < M then the maximum delay that would be allowed before the synchronization occurred would be M - D when it should have been M. The sum of delays is now reset before the synchronization is restarted so that the delay hook will have the same behavior on a restarted synchronization as it does on a first synchronization. ================(Build #4477 - Engineering Case #367528)================ Autodial was not responding, even when the network_name parameter was specified. Autodial functionality has now been restored. ================(Build #4487 - Engineering Case #369238)================ If the schema of a table outside of a publication was altered (for example, table "t1"), and a synchronizing table existed, whose name started with this table's name (for example, table "t1_synch"), that had outstanding changes to synchronize, then dbmlsync would incorrectly report that the schema of the synchronizing table had been altered outside of synchronization. This has now been fixed. ================(Build #4493 - Engineering Case #370609)================ The MobiLink Client dbmlsync, would have complained of an "invalid option ...", if it was started with a configuration file, @filename, and filename contained any extended options specified as -e opt1="val1";opt2=val2;... even if all the extended options were valid. This problem is fixed now. ================(Build #4499 - Engineering Case #372085)================ When the Synchronization Client dbmlsync crashed it would have left behind a temporary file, which would never have been deleted. Now, a check is made at startup for any temporary files left from previous runs and deletes them if they exist.

MobiLink - Charset Conversion (UNILIB)

================(Build #4386 - Engineering Case #345236)================ Microsoft Windows, for Asian (multi-byte) languages, allows a user to define their own characters, including the glyph that is displayed. As part of defining a character, the user picks an unused code point in the character set. MobiLink and ASA were not aware of this new code point, and character set conversion would substitute the "invalid character" for any user-defined characters. Now, the mappings for user-defined characters in cp950 (Traditional Chinese) are included.

MobiLink - HotSync Conduit

================(Build #4207 - Engineering Case #306609)================ The following applies to UltraLite synchronization on the Palm using the HotSync conduit. When no synchronization stream parameters were specified by the application in the ul_synch_info passed to PalmExit, the conduit will check the registry as documented for parameters to use. If the registry contains no parameters, a default of tcpip to localhost is used. Previously, specifying no synchronization stream parameters required setting ul_synch_info.stream_parms to NULL. Now, a setting of NULL or an empty string will cause the registry to be checked for parameters to use. If an application needs to force default parameters (overriding the registry), it should set ul_synch_info.stream_parms = "stream=tcpip;host=localhost"; ================(Build #4208 - Engineering Case #315130)================ Extra debug logging to the HotSync or ScoutSync log can now be enabled for the Palm conduit by setting environment variables. UL_DEBUG_CONDUIT: When this variable is set, a message box will pop up on conduit loading/unloading to confirm entry into the conduit. Requires user intervention to proceed. UL_DEBUG_CONDUIT_LOG: When set to 1, basic logging will be written to the log, possibly including synch parametrs, registry locations and attempts to load libraries. When set to 2, basic logging as well as more detailed IO logging will be written to the log

MobiLink - Java Provider for Sybase Central

================(Build #4076 - Engineering Case #299231)================ Attempts to connect to more than one server via jConnect would have failed, if the servers were running on the same machine. The error message would report that the database could not be started. This has been fixed. ================(Build #4227 - Engineering Case #312114)================ Table lists in the Test Script's Options dialog sometimes didn't reflect the current setting of the order of tables for testing. Synchronization tables could have disappeared in both the 'Synchronized Table Order' list and the 'Synchronization Tables' list and thus would have been unable to be selected for testing. For example, if a few tables were added to the 'Synchronized Table Order' list, OK was clicked in the Options dialog and then the Options dialog was opened again, the selected tables would all applear in the 'Synchronization Tables' list and the tables that were previously in 'Synchronizaton Tables' would have disappared. This problem has been fixed. ================(Build #4245 - Engineering Case #315382)================ When modifying a MobiLink password for a user in the user's properties page, the password would have been updated to the wrong value. This has now been corrected. ================(Build #4263 - Engineering Case #320976)================ When connecting to a database, the plug-in made a second superfluous connection. When disconnecting, this second connections was not closed. This has been fixed, the second connect is no longer made. ================(Build #4352 - Engineering Case #341085)================ It was not possible to connect to an ASE or SQL Server database with a userid that did not require a password. This has been fixed so that connections can now be made with userids that have no password. ================(Build #4433 - Engineering Case #358138)================ Connecting to a database in the MobiLink plug-in by opening the Connect dialog and specifying the connection information, would have caused the information specified (excluding the password) to be saved in the user's .scUserPreferences file under the default connection key "DefConn". The information was saved so that the next time the Connect dialog was opened, it would contain the previous connection information. For security reasons, this feature has been removed. Now, this information is no longer implicitly saved in the user's .scUserPreferences file. Instead, it is persisted in memory for the current Sybase Central session only. Note that the user can still use connection profiles to explicitly persist connection information in the .scUserPreferences file. This change also fixes a problem which could have caused the password to be incorrectly persisted as "***".

MobiLink - Monitor

================(Build #3602 - Engineering Case #301739)================ On Unix platforms, using File Save As in the MobiLink Monitor would have written the file to the initial directory displayed in the dialog, instead of the last directory chosen. If the user did not have write permissions in that directory, then the Monitor would have given an inappropriate "file ... could not be found" message. Also, on both Windows and Unix the Monitor would not have added an extension, if there was a period anywhere in the file path. So an error message would have resulted, if the file name did not end in either .csv or .mlm, and you could override the file type specified in the dialog by typing the other file extension as part of the file name. These problems have been fixed. The MobiLink Monitor now saves to the expected directory for both Windows and Unix. Trying to save to a directory without write permission on Unix, now gives a "file ... could not be accessed" message. For both Windows and Unix, the Monitor now adds the extension chosen in the Save dialog, if it is not already at the end of the file name. ================(Build #4076 - Engineering Case #299246)================ With the UltraLite Java runtime (ulrt.jar) that did not include secure stream classes from Certicom, attempting to use the HTTPS protocol would have given a stack trace. This has been fixed. The HTTPS option is now disabled unless the UltraLite Java runtime includes the secure stream classes from Certicom. ================(Build #4076 - Engineering Case #299440)================ When using large fonts with Windows,, the MobiLink Monitor's New Watch and Edit Watch dialogs could have truncated text in the Remove button and in the time units combo box, if a time-based property was selected. This has been fixed. ================(Build #4083 - Engineering Case #301081)================ Dialogs in the MobiLink Monitor deviated from the Windows Interface Guidlines in the following ways, which affected keyboard accessibility: - The Watch Manager, New Watch and Edit Watch dialogs did not have default buttons. - OK, Cancel and Help buttons had mnemonics. Windows applications do not use mnemonics for these buttons because there are standard keyboard shortcuts (Enter for OK, Esc for Cancel and F1 for Help). - Due to a JDK 1.3 bug (fixed in JDK 1.4), the default button would be the last button to have the focus. These problemhave been corrected. ================(Build #4095 - Engineering Case #303735)================ If MobiLink Monitor was started from the Start menu or from a command prompt in a root folder (such as C:\) then the default autosave file name would have had double slashes (such as C:\\autosave.mlm). Also, the Browse dialog would have opened in the user's home folder, rather than with the file specified in the text box. These problems have been fixed. ================(Build #4215 - Engineering Case #308830)================ Command line options have been added to the MobiLink Monitor so that it can open a file or connect to a MobiLink server on startup. This allows for file associations to be setup for MLM files or have the Monitor connect to a MobiLink server, then close and save results to a file when disconnected (either from the GUI or from the the MobiLink server shutting down). The following command will show the options: dbmlmon -? ================(Build #4245 - Engineering Case #316700)================ The MobiLink Monitor window would always show a title of "Started - MobiLink Monitor" after saving a file or using the View/Go To command. This has been fixed. ================(Build #4255 - Engineering Case #319257)================ Starting the MobiLink Monitor with command-line option /? would have shown an error opening /? as a file, instead of showing the usage. This has been fixed. ================(Build #4259 - Engineering Case #320578)================ A new option, (under Tools>Options>General), "Prompt to connect on startup" has been added to open the Connect dialog on startup if no command line options are specified. The default is for the option to be on. ================(Build #4260 - Engineering Case #320657)================ The Watch Manager was missing mnemonics for lists boxes. These have now been added. ================(Build #4268 - Engineering Case #321594)================ The list of tables in the Synchronization Properties were not being sorted. Now they are ================(Build #4268 - Engineering Case #321664)================ The Monitor was sorting the worker threads as strings. Now they are sorted numerically by the stream number, then numerically by the thread number. ================(Build #4269 - Engineering Case #321844)================ The list of columns in the table did not reverse the sort order if the header was clicked more than once, as is standard. Now when a column header is clicked more than once, the sort order alternates between ascending and descending. ================(Build #4290 - Engineering Case #326172)================ When connected to a MobiLink server, and displaying the chart in By User view, synchronizations could have been shown in the wrong rows when new rows were added (unless they happened to be added in alphabetical order). A workaround to fix the chart is to change to By Worker Thread then back to By User. This problem has been fixed. ================(Build #4302 - Engineering Case #328353)================ If a Monitor session had enough users to cause a vertical scrollbar to be shown in the chart in the 'By User' view, then the overview outline would not have been the correct height when the view was changed to 'By Sync'. This has now beed corrected. ================(Build #4302 - Engineering Case #328466)================ When attempting to save data to an mlm file, if there was insufficient disk space, an error message would have been displayed, and a zero lemgth file would have been created. If an existing file was being overwritten, the existing file would be replaced by a zero length file. Now, if there is insufficient space to write an mlm file, the error message is displayed and nothing is written to disk. ================(Build #4305 - Engineering Case #329774)================ The First, Last, Next, and Previous menu items were enabled, but had no effect if the table was disabled. They are now disabled if the table is disabled. ================(Build #4306 - Engineering Case #329924)================ When a second file or session was opened, the chart pane would have remained scrolled at the same position it was at for the first file or session. Similarly, when the Monitor was started, the chart pane did have a scrollbar, but when a session was closed, the scrollbar remained visible. Now, when a second session is opened the chart pane is scrolled to the beginning, and when a session is closed, the scrollbar disappears. ================(Build #4364 - Engineering Case #343623)================ Using the Tools->Options->Overview menu and dialog options to change the Overview colors of the system watches, would have had no effect. This has been fixed. As a workaround, the Overview colors of the system watches could be changed under the Watch Manager (Tools->Watch Manager) and editing the watch. ================(Build #4451 - Engineering Case #362053)================ The MobiLink Monitor was reporting the wrong number of uploaded bytes. The Monitor would most often have reported the actual value plus one, but it could also have reported even larger values. This has been corrected.

MobiLink - Streams

================(Build #4088 - Engineering Case #304584)================ Starting the Mobilink server with two instances of an HTTP based stream could have caused the stream to behave erratically. This is now fixed. For example: dbmlsrv8 -c ... -x http {port=22222} -x http {port=88888} ================(Build #4091 - Engineering Case #302923)================ When the stream connection string contained an invalid value for the "version" option (ie. anything other than "1.0" or "1.1"), or an invalid value for the "content_type" option (ie. anything other than "fixed" or "chunked"), the stream would have leaked a few bytes of memory. It was possible for synchronizations to succeed, even though the options are specified incorrectly. Both the HTTP and HTTPS streams were affected and are now fixed. ================(Build #4093 - Engineering Case #303298)================ Synchronizations with HTTP 1.1 and nonpersistent connections through a proxy server could have failed. This is now fixed. ================(Build #4098 - Engineering Case #304478)================ When connecting to a busy Mobilink server using HTTP or HTTPS, the communication error 65 (Unable to connect a socket) could have occurred. A failed connect attempt caused an error condition to be set that prevented retries. This has been corrected. ================(Build #4107 - Engineering Case #305477)================ Database scripts that took longer then the 'contd_timeout' setting could have caused the HTTP link to time-out a connection, which would have caused the synchronization to fail. This has been fixed. ================(Build #4255 - Engineering Case #319387)================ On Win32 platforms, a client may have failed when closing a tcpip or http connection, with a system error 10093. This has now been fixed. ================(Build #4273 - Engineering Case #322620)================ In a successful synchronization through ECC, RSA, or HTTPS, the stream error STREAM_ERROR_WOULD_BLOCK would have been reported, even though the sqlcode was SQLE_NOERROR. The secure streams no longer report this error. ================(Build #4282 - Engineering Case #324845)================ The connection between the ISAPI redirector and MobiLink could have timed out during data synchronization, resulting in the data synchronization failing. This was fixed by keeping the connection open. A work around is to increase the system timeout interval, (default is 4 minutes), by setting the following registry key (value is in seconds): \\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\TcpTimedWaitDelay

MobiLink - Synchronization Server

================(Build #3604 - Engineering Case #302966)================ The Mobilink server, when using the HTTP or HTTPS stream, could have crashed on shutdown. On Windows, this would have left the Icon in the Task Bar. This is now fixed. ================(Build #3605 - Engineering Case #303302)================ Synchronizations using HTTP through a proxy server would have failed, if the proxy server changed the content encoding of the message body from fixed length to chunked. This is now fixed. ================(Build #4076 - Engineering Case #298595)================ The MobiLink server could have failed with an ODBC function sequence error when a zero length blob was inserted or a statement-based update was issued, with blobs that were NULL or zero length. This has now been fixed. ================(Build #4076 - Engineering Case #298604)================ On Unix, with the option -v+, Mobilink could have output some wrong SQL statements in the log file when Mobilink logged native SQL statements. When doing the conversion between multibyte and Unicode characterss, a NULL termination character was missed. This is now fixed. ================(Build #4076 - Engineering Case #299081)================ When using ASA as a consolidated database for MobiLink, if any of the tables to be synchronized were located on a remote server (ie proxy tables), the MobiLink server would have encountered the following error: "Feature 'remote savepoints' not implemented" and failed the synchronization. This case is now detected and silently worked around. ================(Build #4080 - Engineering Case #299055)================ You no longer need DBA authority to connect the Mobilink Server to an ASA database. ================(Build #4080 - Engineering Case #300502)================ If errors occurred during the Prepare_for_download and/or Download events, the MobiLink server would have commited the upload on the server side quietly, without notifying the client. The ASA client would the have displayed the error "communication error..." and rolled back the upload. In the next run, dbmlsync would again have complained with "Progress offset mismatch, resending upload from the consolidated database's progress offset". This problem is now fixed. ================(Build #4120 - Engineering Case #307385)================ The MobiLink server could have crashed on shutdown. This was unlikely to have affected synchronizations. It has now been fixed. ================(Build #4123 - Engineering Case #307388)================ When a second MobiLink monitor attempted to connect, it would have received an "unable to read N bytes" error. It now will get an error indicating that another user is monitoring. ================(Build #4123 - Engineering Case #307615)================ The MobiLink option -vh dumps out the schema, but it didn't display the column names, it substituted the name with Column #n. This option has been improved. For clients that don't send the column names to MobiLink, the schema logging will be the same as before; but for clients that do send the column names, MobiLink will now substitute the column names in place of Column #n. ================(Build #4201 - Engineering Case #305551)================ A new command line switch, "-vp -- show progress offsets", has been added to the MobiLink server. With this command line switch, (-v+ may also be used), the MobiLink server will log the consolidated and remote progress offsets in its output file for each publication in every synchronization. The publications may include those that are explicitly involved in the current synchronization, as well as the ones that are not explicitly involved, but are in the same remote database. If the consolidated progress offsets do not match the remote progress offsets, the MobiLink server will print these offsets in its output file, no matter whether this switch is used or not. ================(Build #4201 - Engineering Case #315473)================ A new command line option -vp (or -v+), "show progress offsets", has been added to the MobiLink server. With this newoption, the MobiLink server will log the consolidated and remote progress offsets in its output file for each publication in every ynchronization. The publications may include those that are explicitly involved in the current synchronization, as well as the ones that are not explicitly involved in the currently synchronization, but in the same remote database. If the consolidated progress offsets do not match the remote progress offsets, the MobiLink server will also print these offsets in its output file, no matter whether -vp or -v+ is used or not. UltraLite sequence numbers (ie. ml_user.commit_state on the consolidated side) are also shown. ================(Build #4206 - Engineering Case #306131)================ When a table is added to a Mobilink consolidated database, it is assigned a unique tableid. Scripts created to work on this table will use this tableid when loaded from the database. If the tableid had a value greater than 65535, it was possible that the script would not have loaded, or the wrong script would have been loaded. This has been corrected. ================(Build #4213 - Engineering Case #289423)================ If the begin_connection synchronization script caused an error, and the handle_error event returned a value of 4000, indicating that the Mobilink Server should be shutdown, it would not have been shut down. This has been fixed and the MobiLink server should shutdown as expected. ================(Build #4213 - Engineering Case #308639)================ When the server running a remote database encountered an error during download, and the MobiLink server was expecting a download acknowledgement, there would have been extra communication errors in the MobiLink log. The first error would have been "Download failed with client error -NNN", and then spurious communication errors would have followed. This has now been fixed. ================(Build #4218 - Engineering Case #309512)================ The error and warning counts passed to the following scripts: upload_statistics download_statistics synchronization_statistics could have been wrong. The most likely wrong value was one that was non-zero when it should have been zero. Less likely, the counts could have been smaller than expected. Similarly, the error and warning counts displayed by the MobiLink Monitor could also have been wrong. This has ben fixed. ================(Build #4230 - Engineering Case #312932)================ Using statement-based scripts could have caused an ODBC error, if the -zd switch was not used when starting the MobiLink server. The upload_new_row_insert and upload_old_row_insert events were affected by this. This has now been fixed. ================(Build #4237 - Engineering Case #314861)================ The MobiLink server may have crashed when executing an ODBC statement that had been previously executed. This would only have occurred if the script happened to be identical for two different tables. This was most likely to have occurred when using download_delete_cursor and the truncate table feature, where the script was typically "select NULL". One workaround is to add some comment text to the script to make it unique. This problem has now been fixed. ================(Build #4239 - Engineering Case #315475)================ The syncase125.sql script, which sets up MobiLink system tables, was not updated when 8.0.2 was released. It is now fixed, but can be updated manually by ading the following to the end of the file: exec sp_procxmode 'ml_add_user', 'anymode' exec sp_procxmode 'ml_add_table_script', 'anymode' exec sp_procxmode 'ml_add_lang_table_script', 'anymode' exec sp_procxmode 'ml_add_java_table_script', 'anymode' exec sp_procxmode 'ml_add_dnet_table_script', 'anymode' exec sp_procxmode 'ml_add_connection_script', 'anymode' exec sp_procxmode 'ml_add_lang_connection_script', 'anymode' exec sp_procxmode 'ml_add_java_connection_script', 'anymode' exec sp_procxmode 'ml_add_dnet_connection_script', 'anymode' go ================(Build #4245 - Engineering Case #315662)================ If MobiLink called a user implemented .NET script and the script had an incorrect signature (argument list), then the MobiLink server would have shut down. The MobiLink server now aborts the synchronization only and continues to accept connections. ================(Build #4253 - Engineering Case #302620)================ MobiLink synchronization was not working for the following three Japanese characters when used with a Japanese database (collation 932JPN): 0x8160 Wave Dash 0x8161 Double Vertical Line 0x817c Minus Sign The has been fixed. ================(Build #4272 - Engineering Case #322076)================ When connecting to the Synchronization Server with Version 9.0 client software, the server's worker thread could possibly have hung. This has been corrected, but as a work around, the worker thread can be recovered by killing the client process. ================(Build #4272 - Engineering Case #322165)================ When the MobiLink server was run with the command line option -sl Java, it may have hung on shut down. This would have been more likely to have happened when AWT support was invoked. This problem is now fixed. Another problem was that the server may have failed to report the list of non-daemon threads being stopped due to a shutdown. Now the complete list is reported as an error so that user may implement their shutdown code correctly. ================(Build #4272 - Engineering Case #322199)================ The Synchronization Server may not have responded to tcpip requests by default. This has been fixed, but a workaround is to specify tcpip explicitly using the option -x tcpip( ... ) ================(Build #4279 - Engineering Case #316036)================ When the MobiLink Server was running against ASE, if the ASE server was shut down for some reason and restarted, the MobiLink server would have kept running, not knowing the ASE server had been restarted. The MobiLink server will now detect that the ASE server has been restarted and reconnect. ================(Build #4283 - Engineering Case #323844)================ Synchronizations would have failed reporting an error like the following: SQL statement failed: (-194) No primary key value for foreign key '<role name>' in table '<fk table name>' if the remote database was blank padded and the download stream contained one or more rows that violated foreign key constraints on tables in the publication being synchronized. Now dbmlsync will go through its normal RI cleanup procedures in this case. These procedures generally result in the rows that violate the foreign key constraints being deleted. ================(Build #4289 - Engineering Case #325868)================ Starting the evaluation version of the MobiLink server would have showed the 60-day evaluation notice and waited for user input. Pressing 'Enter' would have caused the notice to have been re-displayed again. The evaluation screen message that asks the user to hit 'Y' or 'Yes' to accept the license agreement, was not being displayed. This is now fixed, but a work around is to enter 'Y' or 'YES' to confirm acceptance of the evaluation license agreement. ================(Build #4290 - Engineering Case #326150)================ The MobiLink server may have crashed when using cursored uploads. This is now fixed, but a workaround is to disable the statement cache (-hwC+) in versions 8.0.0 and later. No workaround is available for earlier versions. ================(Build #4301 - Engineering Case #328180)================ Some of the download scripts take an optional timestamp parameter (last_download_timestamp). This timestamp can be modified by creating a modify_last_download_timestamp script which is called before the download scripts. The unmodified timestamp was being passed to the connection scripts, now the modified timestamp is used. Table scripts were not affected. ================(Build #4307 - Engineering Case #330441)================ The -zt command line option for dbmlsrv was mistakenly shown in the usage displayed on Unix platforms. This switch is only available on Windows and now is only shown when usage is displayed when running on Windows. ================(Build #4313 - Engineering Case #331682)================ The MobiLink server would have shutdown immediately, after succesfully starting up, if it used the tcpip, http or https communications link and no HOST parameter was specified (which defaults to localhost), and localhost could not be resolved. This has been corrected. ================(Build #4316 - Engineering Case #332836)================ If a connect event name or table event name was unrecognized, the Mobilink Server would have put the error message "unrecognized connection/table event name" in the Mobilink Server's log. This was confusing, as errors should cause the synchronization to be aborted, but in this situation, we want the synchronization to continue. So the message has been changed from an error to a warning. ================(Build #4323 - Engineering Case #333954)================ Empty connections were producing errors when the MobiLink server command line option, -vf wasn't used. Load balancers, with multiple MobiLink servers all running against the same consolidated database, tend to frequently open empty connections (ie. with no data flow) to the MobiLink server. The sheer number of these empty connections could have caused the MobiLink server log to fill with errors. These error messages are no longer displayed when -vf isn't used. ================(Build #4324 - Engineering Case #333822)================ The MobiLink server would not start when run against a database using the Turkish (1254trk) collation, but would have failed with the error "Invalid option 'CHAINED' -- no PUBLIC setting exists". MobiLink was using the wrong case for the Chained option. This is now fixed. ================(Build #4328 - Engineering Case #334875)================ After system reboot, user login or Explorer restart, the system tray icon of the MobiLink server did not appear. This problem also affected dbmlsync.exe, dbremote.exe, and dbltm.exe and has been fixed. ================(Build #4328 - Engineering Case #335092)================ Under forced conflict mode, uploaded deletes would have been applied in the wrong order. Consider the following sequence uploaded into tables Parent and Child, where table Child has a foreign key to table Parent: (At the remote) DELETE FROM Child WHERE foreign_key = 1; DELETE FROM Parent WHERE primary_key = 1; COMMIT; (synchronize) The second delete from the remote (ie. from Parent) would have been applied before the first delete, causing a referential integrity violation in the consolidated during upload. Prior to this change, the behaviour was to generally delete from Parent before deleting from Child. Now, the behaviour is to delete from Child before deleting from Parent. ================(Build #4333 - Engineering Case #335787)================ The download_statistics event has the number of downloaded bytes as a parameter. This parameter was always zero for table scripts and a very small value for connection scripts. This problem would only have occurred if the client had download acknowledgements disabled. This has been fixed. ================(Build #4355 - Engineering Case #341757)================ Synch stream errors are reported by the MobiLink server when detected during a synchronization. If an error was detected and reported, that same error would have been reported for all subsequent synchronizations that had a stream error, until the MobiLink server was restarted. Note, the fact that an error was being reported was legitimate, it was the reason for the error that may have been erroneous. ================(Build #4367 - Engineering Case #344274)================ If a MobiLink server was run as a Windows service, and it had a dependency on an Oracle service that was the consolidated database server, MobiLink may have failed to start. The error would have mentioned being unable to connect to the consolidated database. Now, the MobiLink server retries connecting on startup. Retries are once a minute for ten minutes. After this, failure to connect results in startup failure. ================(Build #4369 - Engineering Case #338095)================ If a consolidated database had Proxy Tables or Remote Procedure Calls defined to a remote server, and an error occured when executing a script that referenced the Proxy Table or Remote Procedure Call, then the MobiLink Server could have gone into an infinite loop re-trying the same script indefinitely. Now the handle_error procedure is called after these errors occur. ================(Build #4369 - Engineering Case #343849)================ When starting the MobiLink Server on Windows with an Internet Explorer older than version 4.0, it would have failed with an error that certain entry points could not be found in wininet.dll. The wininet dependency has now been removed from the server. The same dependency has also been weaken on the client side, so that the relatively up-to-date wininet.dll is required only when automatic dialup is invoked. ================(Build #4370 - Engineering Case #344544)================ When using IBM's DB2 ODBC driver, the MobiLink server may not have been able to insert or update BLOBs bigger than 32K. The error in the MobiLink log (using IBM DB2 version 8.1), would have been: DIAG [22001] [IBM][CLI Driver] CLI0109E String data right truncation. SQLSTATE=22001 (-99999) This has been fixed. ================(Build #4414 - Engineering Case #351109)================ When rows were uploaded from a Java UltraLite application to MobiLink, it was possible for MobiLink to download those same rows back to the UltraLite application, even though these rows were not changed and should have been filtered from the download stream. This problem has now been corrected. ================(Build #4434 - Engineering Case #343460)================ If a combination of inserts and updates existed in the upload stream for a given table, and an error occurred when MobiLink was applying these operations, it was possible for the wrong script contents to be written to the MobiLink log when the error context information was being written. The correct script contents are now written to the log. ================(Build #4451 - Engineering Case #362015)================ The MobiLink Server would not have detected update conflicts, if the server was running with the command line option -s n (where n was greater than 1) or without -s at all, and the consolidated database was a Microsoft SQL Server or Oracle database. Also, the synchronization had to have been a statement-based upload, with no upload_fetch script, and an upload stream had to have contained updates that had an unsatisfied WHERE clause in the consolidated database. These updates would have failed due to the unsatisfied WHERE clause, but the MobiLink server would have ignored these failures without giving any error or trying to resolve these conflicts. Now if the batch contains updates and the number of affected rows doesn't match the number of rows applied, the server will roll back the operations and try them again using single-row mode. ================(Build #4478 - Engineering Case #367764)================ If the consolidated and remote databases had different collations, the MobiLink Synchronization server may not have respected the column width defined in the remote database for columns defined with char or varchar datatypes. This may have caused the ASA client to crash. Now, the MobiLink server will display an error, and abort the synchronization, if the length of the column value is greater than the column width defined in the remote database. ================(Build #4486 - Engineering Case #369479)================ The MobiLink server could have crashed if all the following had occured on the same worker thread: - an error was handled on upload on the last table - a download cursor was opened for the first time on any table - a subsequent sync used the download table script without having an upload error handled, and there were multiple rows to download This is now fixed. ================(Build #4502 - Engineering Case #372098)================ In rare circumstances, an upload could have failed with the error "Unknown Client Error n", where n was some random large number. This error was usually followed by another error reporting that "A protocol error occurred when attempting to retrieve the remote client's synchronization log". Although there are circumstances where this is a valid error to report, an instance where this error was incorrectly reported has now been fixed. ================(Build #4502 - Engineering Case #372262)================ Connecting to the MobiLink server immediately after a successful autodial could have failed with error WSAEHOSTUNREACH (10065). The fix is to repeatedly attempt to open the session until it is successful, or the network_connect_timeout expires, default 2 minutes.

MobiLink - Utilities

================(Build #4093 - Engineering Case #302789)================ When an ActiveSync synchronization was initiated, the desktop provider would wait 30 seconds for a response from the client and would fail if it didn't receive it. This timeout value can now be set using a new -t flag when running dbasinst to register the ActiveSync provider. Here is a description of the -t flag from dbainst's new usage: -t<n> the desktop provider should wait n seconds for a response from the client before timing out; the default is 30 dbasinst stores the timeout value in the registry under "HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\MobiLink\ActiveSync Synchronization\Connection Timeout". ================(Build #4360 - Engineering Case #342817)================ When using the MobiLink authentication utility (dbmluser), updating a user password may have caused an ODBC error, although the update would have succeeded. This error message is no longer generated. ================(Build #4362 - Engineering Case #346733)================ The security certificate generation utility, gencert, would have failed to accept input redirection from a file (eg. gencert < input.txt). This has been corrected. ================(Build #4362 - Engineering Case #346734)================ The security certificate generation utility, gencert, would always have returned 0, even when an error occurred. Now, if an error occurs, gencert's exit code is EXIT_FAILURE (as defined in stdlib.h). ================(Build #4367 - Engineering Case #343813)================ If the redirector that is shipped with MobiLink was configured for iAnywhere Wireless Server, the redirector would have failed with the error "ERROR: user requesting redirection to unknown server:iaws". This has been fixed, the redirector can now be configured for either MobiLink or iAnywhere Wireless Server. ================(Build #4401 - Engineering Case #348166)================ An application using the DBSynchronizeLog function of the Database Tools interface could have crashed, if the msgqueuertn function pointer in the a_sync_db structure was set to NULL. Now, if the pointer is set to NULL, the function default implementation is to sleep for the requested time period. ================(Build #4403 - Engineering Case #351756)================ An application connecting to the MobiLink redirector, when configured to use multiple MobiLink servers, could hang under the following situation: The application connected to the redirector, which then selected one of the MobiLink servers to send the request. If this server did not respond, the redirector detected this and marked the server as dead. The request would then have been routed to another MbiLink server. If a second application then connected to the redirector, and it initially happened to select the dead MobiLink server to service the request, it would eventually have been routed to a live MobiLink server, but a third application connecting to the redirector would have caused the application to hang. Note that this problem could have occurred with a live MobiLink server, but was timing-dependent, in the following case: the live server would have had to have been marked dead, and the background thread that updates liveness state information, would not have updated the state yet. This was unlikely, unless the sleep interval for the background thread was high, and the number of requests was high. In that case, the state information was more likely to be out of date with respect to the MobiLink server when the third client connected. These issues have been fixed. ================(Build #4406 - Engineering Case #344018)================ The MobiLink user authentication utility dbmluser would have crashed if it couldn't determine the default collation from the locale setting. The documentation is incorrect, the default collation does not fall back to 1252LATIN1 on single-byte machines and 932JPN on multi-byte machines. The default collation actually would have become 'unknown', (or in some cases 'ISO_BINENG'), which was a collation that dbmluser did not expect. Now the problem in determining the default collation has been corrected, as well as the cause of the crash. ================(Build #4414 - Engineering Case #353828)================ When using the Windows Performance Monitor to display MobiLink statistics, the counters were always displayed in English on Japanese, Chinese, French or German Windows. This has now been fixed. ================(Build #4448 - Engineering Case #363625)================ A situation where a client request could have potentially crashed the ISAPI redirector as been fixed.

MobiLink - scripts

================(Build #4092 - Engineering Case #302822)================ If code executed in a user implemented shutdown listener called addShutdownListener() or removeShutdownListener() during shutdown, an exception could have apeared in the MobiLink output log and some shutdown listeners may not have been called at shutdown time. This is now fixed. ================(Build #4114 - Engineering Case #306344)================ When calling the Mobilink system procedure ml_add_table_script on DB2 with a "null" script parameter value, it would have failed with the message: SQL4302N Java stored procedure or user-defined function "DB2ADMIN.ML_ADD_TABLE_SCRIPT", specific name "SQL021223140150845" aborted with an exception "[IBM][CLIDriver] CLI0115E SQLSTATE=38501". Note, the name "SQL021223140150845" may be different on different systems. Both ml_add_connection_script and ml_add_table_script had this bug, which has been fixed. ================(Build #4120 - Engineering Case #307194)================ If a JAVA or .NET handler for the report_error event was defined and it used parameters and no script was defined for the handle_error event, Mobilink would report an error similar to: "Not enough arguments to execute script: "moderr.report_error". 5 arguments are needed only 0 are available.". This is now fixed.

SQL Remote for Adaptive Server Anywhere - Database Tools Interface

================(Build #4099 - Engineering Case #304512)================ When an offline transaction log ended with a zero-byte string for the last valid log operation, SQL Remote could have reported "Log operation at offset X0 has bad data at offset X1" (where X1 > X0 ), if this last log operation was on the last log page, or "Transaction log file file_name1 overlaps with log file file_name2", if this last log operation was not on the last log page (log files contain one or more unused pages). This problem could have happened in DBMLSync and DBLTM as well. The problem has been fixed. ================(Build #4206 - Engineering Case #304766)================ If the connection that was used for processing incoming messages was dropped, SQL Remote for ASA would have gone into an infinite loop display the error: "SQL statement failed: (-101) Not connected to a database". The errors SQLE_CONNECTION_TERMINATED and SQLE_NOT_CONNECTED were not handled properly. This problem is now fixed. ================(Build #4275 - Engineering Case #322897)================ If the starting log offset X (the minimum value of the log_sent column in the sysremoteuser table for dbremote and the minimum value of the progress column in the syssync table for dbmlsync) in the current replication/synchronization was greater than the redo_begin of the on-line transaction log, any log operations with log offsets less than X in transactions that started in the offline transaction logs and committed at the offsets greater than X could have been skipped by dbremote and/or dbmlsync. This problem has been fixed. ================(Build #4341 - Engineering Case #338704)================ If the Compression option in the database was set to "-1", it was possible for dbremote to discard a valid message and report the error "Incoming message was created by a different version of the software". This has now been fixed. ================(Build #4372 - Engineering Case #344321)================ If an online transaction log was truncated, just when dbremote started scanning the online log, dbremote may have resent transactions that had been sent in previous messages. This problem is now fixed. ================(Build #4373 - Engineering Case #345076)================ If a transaction log directory contained many files that were not transaction log files, or the directory contained some files that were not transaction log files and dbremote was run many times in non-hover mode, dbremote may have reported the errors: "too many open files" or "missing transaction log files" and then stop. Everything would have been fine when restarted. This problem is fixed now. Note, this problem also affected MobiLink's dbmlsync. ================(Build #4399 - Engineering Case #349918)================ SQL Remote may have reported the error "No log operation at offset x" and then exited. After examining all the transaction logs, one may find that the log offset x was in the header page of a transaction log file. This problem could have occurred if: 1. the last log operation in the latest offline transaction log was a "redo_release"; and 2. in the online transaction log, there is no log operation of commit, rollback, or release and no actual data to be replicated. This problem is fixed now.

SQL Remote for Adaptive Server Anywhere - File Messaging for Adaptive Server Anywhere

================(Build #4250 - Engineering Case #297714)================ When dbremote (or ssremote) encounters an error when trying to delete a file using the FILE based message link, the delay between the failure and the next attempt to delete the file can now be set using the "unlink_delay" message control parameter for the FILE based message link. For example : SET REMOTE file OPTION "public"."unlink_delay" = '10'; Dbremote will pause 10 seconds before attempting to delete the message again. The number of attempts made to delete the file (five) has not changed. ================(Build #4427 - Engineering Case #355574)================ The SQL Remote Message Agents dbremote and ssremote, the SQL Remote Open Server ssqueue, the Log Transfer Manager dbltm, and MobiLink Client dbmlsync, could have hung when attempting to write a message to the output log that was greater than 64Kb in size. This has now been fixed.

SQL Remote for Adaptive Server Anywhere - Ftp Messaging for Adaptive Server Anywhere

================(Build #4285 - Engineering Case #322583)================ Dbremote would have reported an error if the FTP server returned the error code '450' in response to the NLST command on an empty directory. Dbremote now treats this as an empty directory. ================(Build #4340 - Engineering Case #336531)================ When attempting to replicate using the FTP message link, if the FTP server was ProFTP, dbremote would have failed with a socket timeout error. A work around has been implemented for a difference in behaviour in the way a ProFTP server responds to an NLST command when the directory is empty.

SQL Remote for Adaptive Server Anywhere - SQL Remote Message Agent

================(Build #4303 - Engineering Case #328956)================ If the minimum log_sent value in the SYSREMOTEUSER table pointed to the middle of an operation in the transaction log, then dbremote would still have sent data starting at the beginning of the transaction pointed to by the bad offset. Now, dbremote will return an error (No log operation at offset X) in this situation. ================(Build #4441 - Engineering Case #360190)================ SQL Remote (dbremote) may have hung when scanning transaction logs if the server logged a checkpoint that has a previous checkpoint pointing to itself. This problem has been fixed. Note, this problem also affected Mobilink's Synchroniztion Client and the ASA Replication Agent ================(Build #4481 - Engineering Case #354147)================ When the log scanning tools were looking for the log file with the desired starting log offset, if that log file had a transaction in it which began in an earlier log file, but the log file that contained the start of the transaction could not be found, an error would have been reported similar to "Missing transaction log(s) in between file AC.log (ending at offset X) and file AD.log (starting at offset Y)". The offsets reported would have been incorrect, and upon inspection, the ending log offset of AC.log would have likely been the same as the starting log offset of AD.log. The correct error is now reported, "Missing transaction log(s) before file AA.log". ================(Build #4512 - Engineering Case #376895)================ When the database option "Delete_old_logs" was set to "on", SQL Remote, (as well as MobiLink, and the ASA RepAgent), may reported "missing transaction log(s)...". This would have occurred in the following situation: 1) the online transaction that contains the last replication/synchronization offset, had been renamed, say to X; 2) the offline log X contained transactions that started from an early log, say Y; and 3) the log Y contained transactions started from an earlier log, say Z. Transaction log Z may have already been deleted. This problem is fixed now.

SQL Remote for Adaptive Server Anywhere - Vim Messaging for Adaptive Server Anywhere

================(Build #4340 - Engineering Case #326377)================ When accessed via the VIM message link, messages were not always deleted from a ccMail mailbox after being processed. Messages are now deleted after being processed.

UltraLite - Analyser Java Classes

================(Build #4077 - Engineering Case #299786)================ The UltraLite analyzer was generating a macro that was not defined, when processing a query that used the STR() function with the last 2 (optional) parameters omitted. The analyzer has been changed so that it generates the defined macro with the default parameters supplied, if they are not specified. A workaround is to add the macro: #define UL_STR_CHAR_DOUBLE( l, dst, s1 ) \ ULStr( UL_STRING(dst), s1, (ul_s_long)10, (ul_s_long)0 ) to the user?s ulprotos.h file. This workaround only works if both optional parameters to the function are omitted. ================(Build #4209 - Engineering Case #308453)================ For Palm applications, the ULSEGDB segment output by the analyzer contains row management code for all tables. If an application had a large number of tables, the ULSEGDB segment may have exceeded the maximum size of 64k. A workaround when this occurs is to edit the generated file and insert extra segments manually. The analyzer now outputs optional segment divisions within ULSEGDB code which are enabled individually by defining a corresponding preprocessor symbol. There is an optional segment division at each table. The segments are named ULSTn where n is an integer (the table number), and each is activated by defining UL_ENABLE_SEGMENT_ULSTn. For example, suppose an application has 5 tables. The generated code will resemble: start ULSEGDB segment start ULST1 segment (if UL_ENABLE_SEGMENT_ULST1 defined) <code for first table> start ULST2 segment (if UL_ENABLE_SEGMENT_ULST2 defined) <code for second table> ... start ULST5 segment (if UL_ENABLE_SEGMENT_ULST5 defined) <code for fifth table> Defining only UL_ENABLE_SEGMENT_ULST4 will leave tables 1 through 3 in ULSEGDB but put tables 4 and 5 into ULST4. Extra segments should be enabled as required to avoid exceeding the segment maximum size. Note also this assumes generated code segments have been enabled by defining UL_ENABLE_SEGMENTS (and UL_ENABLE_GNU_SEGMENTS if applicable). In CodeWarrior, these #defines should be added to the prefix file; for PRCTools, use the -D option. ================(Build #4269 - Engineering Case #321682)================ Attempting to run ulinit or ulgen against an ASA reference database with a Turkish collation, eg 1254TRK, would have caused the error ?Table ?sysarticle? not found?. This has been fixed. ================(Build #4273 - Engineering Case #321970)================ When a query made use of an index on a column that allowed NULLs, it was possible that the UltraLite analyzer would have generated code that referenced the identifier ULConstantNull_ANY. Since this constant was not defined, the application would consequently not compile. This has been fixed. ================(Build #4389 - Engineering Case #344210)================ For queries with result set expressions of type timestamp, the analyzer could have generated C++ code that would not have compiled. For example, if c1 was a column of type datetime, then C++ code generated for the following query would not have compiled: SELECT max(c1) FROM T The C++ code generated included a method on the generated ULResultSet class that returned the column?s SQL type (GetColumnSQLType()). The symbol generated for some timestamp expressions would have been SQL_TIMESTAMP_STRUCT which was not defined (the valid symbols are defined in ulapi.h). This has been fixed so that the column SQL type is now defined as SQL_TIMESTAMP.

UltraLite - Code Generator

================(Build #4080 - Engineering Case #300534)================ The analyzer could have generated code after a generated return statement. This code was only defined for the Palm platform and it was defined to free memory. This has been fixed. ================(Build #4087 - Engineering Case #298914)================ The UltraLite analyzer would have generated code for some queries that declared the same variable name twice. This has been fixed. ================(Build #4218 - Engineering Case #307354)================ Under certain rare conditions, the "Get" functions generated by the C++ API would have been missing code fragments, resulting in compilation errors and/or erroneous results. This has now been fixed. ================(Build #4251 - Engineering Case #317934)================ When the -x command-line option was used with ulgen, some of the filenames generated with #include statements used absolute file names. This has now been changed to instead generate relative file names. ================(Build #4379 - Engineering Case #346050)================ When generating C++ code, the UltraLite analyzer generates class methods that allow the caller to determine the size of a column in a query (ie how much memory needs to be allocated to ensure any value in that column can be stored). For a column of type BINARY(n), the size was returned as (n+1). Since BINARY column values are fetched by using a p_ul_binary datatype (a structure with a length field and an array of bytes for the data), the correct size should have been sizeof(ul_length) + n. This has now been fixed. Since the size of ul_length is 2, a workaround would be to simply add 1 to the return value of a GetSize<name> method generated for a BINARY column.

UltraLite - CodeWarrior plugin

================(Build #4214 - Engineering Case #308329)================ This change works around a problem in Codewarrior 6 and 7, where they would sometimes not handle compiling an application with an empty segment. This problem would have lead to an error while running the application, such as "Application has just read from low memory... ". A fix was put into a Codewarrior 7 patch, which was included in all versions of Codewarrior 8 and 9. The empty segment in the Codewarrior 7 Certicom runtime has been removed.

UltraLite - MobiLink Server

================(Build #4272 - Engineering Case #322340)================ Disabling the ActiveSync provider after a synchronization would have caused ActiveSync to hang.

UltraLite - Native UltraLite for Java

================(Build #4077 - Engineering Case #299822)================ Connection.getTable(), TableSchema.getOptimalIndex() and TableSchema.getIndex() would have returned SQLE_CLIENT_OUT_OF_MEMORY when the table or index requested could not be found. Now SQLE_INDEX_NOT_FOUND or SQLE_COLUMN_NOT_FOUND is correctly returned. ================(Build #4079 - Engineering Case #300214)================ Calling TableSchema.isColumnGlobalAutoIncrement() with an invalid column name would have caused a crash. It now throws a SQLException with SQLE_COLUMN_NOT_FOUND. ================(Build #4299 - Engineering Case #327668)================ Attempting to delete all rows matching a certain criteria, assuming there was an appropriate index, may have missed some rows or deleted the wrong rows. For example: t.findBegin(); <specify search criteria using t.set*(...)> t.findFirst(); t.delete(); while( t.findNext() ) { t.delete(); } would have skipped some rows because delete() modified the search criteria. If there were an odd number of rows matching the search criteria, this approach would have deleted rows that did not match the search criteria. Table.delete(), Table.truncate(), and Table.deleteAllRows() have now been changed so as to cancel all edit and search modes.

UltraLite - Runtime Libraries

================(Build #4076 - Engineering Case #299222)================ Under certain conditions, an empty result set was not produced when GROUP BY was used and no rows were obtained. The one-row result set contained meaningless values. This has been fixed. ================(Build #4076 - Engineering Case #299224)================ Under certain conditions, an empty result set was not produced when GROUP BY was used and no rows were obtained. The one-row result set contained meaningless values. This has been fixed. ================(Build #4097 - Engineering Case #303926)================ As of version 8.0.2 the cipher used to encrypt the data stream was changed from Certicom_tls to ECC_tls. For the Mobilink server, both names were kept for backwards compatibility, however this was not done for Ultralite. The documentation currently reads: "For Hotsync and Scoutsync, the stream parameters need to be specified in the stream parameters in much the same way as for Adaptive Server Anywhere MobiLink clients. The format is: security=cipher{ keyword=value;... } where cipher must be certicom_tls... " This should have read as: "where cipher must be ecc_tls..." For backwards compatibility, ecc_tls can also be specified as certicom_tls. ================(Build #4105 - Engineering Case #306301)================ When using multiple threads with UltraLite (and hence multiple connections), rows could have been lost or not visible, the database could have appeared corrupt, or synchronization could have failed. The incorrect connection number could have been used in any given call. This has been fixed. ================(Build #4200 - Engineering Case #304950)================ During a ULSynchronize call, the ul_synch_info output fields were not necessarily set. This would only have been a problem if ULInitSynchInfo was not called before each synchronization (because ULInitSynchInfo clears all output fields), but the documentation did not explicitly state this was a requirement. Now all output fields are always set, so it's possible to call ULSynchronize twice without an intermediate ULInitSynchInfo call if desired. ================(Build #4209 - Engineering Case #308450)================ In version 8.0.1, the UltraLite schema information output by the analyzer was extended to support additional features, including sending column names to Mobilink. This resulted in more data segment usage by the generated code, possibly exceeding the Palm limitation of 64kb. The extended schema information for columns may now be omitted to decrease data segment usage. To enable this feature, define the preprocessor symbol UL_OMIT_COLUMN_INFO before compiling all generated files. (In CodeWarrior, this #define should be added to your prefix file; for PRCTools, use the -D option.) Note: when this feature is enabled, the following features are not available and must not be used: - send_column_names synchronization parameter - schema upgrades (applies to 8.0.2 and later) ================(Build #4215 - Engineering Case #309299)================ When the database store was set as in-memory (ie no persistent file), Java UltraLite would have experienced corrupted temp table when doing updates. This is now fixed. ================(Build #4220 - Engineering Case #310304)================ The documentation incorrectly states that when using the C++ API, storage parameters can be passed to the UltraLite runtime either by using the UL_STORE_PARMS macro or by passing them directly to the ULData::Open method. Actually, using the ULData::Open method is the only way parameters can be passed. ================(Build #4276 - Engineering Case #323200)================ If two cursors were pointing to the same row and they both did a positioned delete, the second delete would have undone the first, and the row would have remained unchanged. If the second cursor did an update instead, the original deleted row would have come back and the new version of the row would have been added to the table as an entirely new row. Now, if the second cursor does a delete or update on a row that another cursor has just deleted, the operation will fail and SQLE_NOTFOUND will be returned. ================(Build #4276 - Engineering Case #323203)================ Executing a DELETE WHERE CURRENT OF cursor statement could have caused a future FETCH RELATIVE 0 to actually move the cursor ahead one row. This has been fixed. ================(Build #4285 - Engineering Case #325039)================ Certain Unicode characters would have incorrectly compared as equal, possibly resulting in a corrupt index, if they differed only in the high byte. For example, an index containing a string column with these characters could have failed to find rows previously inserted, resulting in invalid index entries after deleting rows. This has been fixed. ================(Build #4286 - Engineering Case #325533)================ When SQLPP was supplied with a user-specified collation sequence, with a name that differed from an ASA standard collation sequence, when an Ultralite database was being generated, nothing would have been generated and the error message: Cannot generate UltraLite collation sequence for <name of collation> would be displayed. This was corrected. ================(Build #4299 - Engineering Case #327823)================ It was possible for an autoincrement (or global autoincrement) default on a numeric column to overflow and cause other values in the row to have been corrupted. This hasnow been fixed. ================(Build #4310 - Engineering Case #331112)================ Forgetting to specify the sync stream type would have resulted in a null dereferencing when synchronizing. This has now been fixed. ================(Build #4314 - Engineering Case #332213)================ The executeUpdate() method of the PreparedStatement clase would sometimes have returned the wrong update counter. The counter kept growing after each call to executeUpdate(), even though there was no actual rows updated. This is now fixed. ================(Build #4319 - Engineering Case #333484)================ If UltraLite on Palm attempted to recover a database on an SD card, and the recovery included truncating the file (because it had been extended without a successful checkpoint), subsequent use of the file could have possibly caused a memory error. This has been fixed. ================(Build #4324 - Engineering Case #334097)================ When calling ULGetSynchResult( result ) after synchronizing, without using the Synchronization Observer, result->status.state would have been incorrect. The state could also have been incorrect, when calling ULGetSynchResult after restarting the database, when the UltraLite application had previously crashed or hung after a synchronization with or without the Observer. This has been fixed. ================(Build #4358 - Engineering Case #340902)================ An UltraLite application, running on Palm devices, would have failed to synchronize new or updated rows after the following sequence: - PalmExit - drop database - PalmLaunch Switching to another applcation, or a reset at any point after the PalmExit, would avoid (or recover from) this condition. This has been fixed. ================(Build #4385 - Engineering Case #347363)================ When synchronizing with the Palm HotSync conduit, database corruption could have occurred if a table with no other synchronization activity had rows deleted via the automatic RI cleanup (cascade delete on download). This corruption prevented further successful synchronizations, signaling the SQL code -755. This problem is fixed. Existing databases should be dropped and recreated via synchronization when the patch is deployed. ================(Build #4392 - Engineering Case #349254)================ If a download conflict error occurred during synchronization, the UltraLite application could possibly have crashed at some point in the future. This has been fixed ================(Build #4439 - Engineering Case #359409)================ When a java.sql.Timestamp type value was inserted into a column of type TIMESTAMP, the conversion of the nanosecond portion of the java timestamp to the microsecond portion of the UlDateTime was incorrect. Thus timestamps like 01:20:60 were possible. This has now been corrected. ================(Build #4502 - Engineering Case #373035)================ Performing a synchronization that downloaded rows to a table on which a cursor had been opened, could have resulted in the cursor being positioned on an incorrect row following an ABSOLUTE fetch. UltraLite tries to optimize ABSOLUTE fetches by replacing them with RELATIVE ones (if it thinks it will be more efficient). The algorithm first verifies that no tables in the cursor have been modified, otherwise it does not attempt the optimization. The problem occurred due to the synchronization code not marking the tables as modified. Now they are.

UltraLite - SQL Preprocessor

================(Build #4234 - Engineering Case #314230)================ Under certain conditions, the SQL preprocessor (or ULGEN) would have created incorrect UltraLite code for queries which used an index in which there were columns ordered as DESCENDING. This resulted in no rows being retrieved for the query. This has now been fixed. ================(Build #4286 - Engineering Case #325782)================ When SQLPP was supplied with a user-specified collation sequence file that did not exist, the SQLPP utility would have crashed. This is now fixed.

UltraLite - UltraLite Schema Painter

================(Build #4112 - Engineering Case #306120)================ When creating a column in the UltraLite schema painter, if the default value chosen was not compatible with the column datatype chosen, the schema painter would have issued an uninformative error message. It now indicates that the column type and the default do not match. ================(Build #4112 - Engineering Case #306122)================ When creating an index with the UltraLite Schema Painter, if an index name was specified that already existed, the existing one was over written without warning.ÿ The index creation dialog now prevents a user from creating an index with the name of an existing index. ================(Build #4112 - Engineering Case #306204)================ The UltraLite Schema Painter would not have properly updated the icons for columns in the primary key, if the operation was cancelled. For example: - Edit an existing table - Alter the primary key by adding a column to it - Cancel the editing of the table Refreshing the application would make it appear as though the column that was added to the primary key (but should have been discarded) was in fact in the primary key. This has been fixed. ================(Build #4115 - Engineering Case #306245)================ When altering a primary key for a table in the UltraLite Schema Painter, if the user pressed Cancel and then went to alter the key again, the columns that were added but cancelled appear to be back in the primary key. This has been fixed. ================(Build #4122 - Engineering Case #308327)================ UltraLite schemas created by the Schema Painter, or ulxml utility, would have had their case-sensitivity reversed. For case sensitive databases, when case should have been respected, it was ignored, and for case insensitive database, when case need not have been respected it was. This has been corrected. ================(Build #4209 - Engineering Case #307579)================ When attempting to drop a table, with the UltraLite schema painter, on a newly created schema file could have failed with SQLCODE 0. Attempting to drop the table again, would have properly dropped the table. This is now fixed so that the table is dropped on the first attempt. ================(Build #4212 - Engineering Case #308131)================ The UltraLite Schema Painter allows schema files to be read and stored as XML files. Loading a schema in XML format and saving it and then attempting to load another XML file (without shutting down the schema painter) would have caused an error message saying the file didn?t exist or was invalid. This is fixed. A workaround would be to shut down the Schema Painter after saving an XML file and start it up again to load another file. ================(Build #4214 - Engineering Case #308815)================ The UltraLite Schema Painter would have given a warning if an attempt was made to create a table with a name that was already in use. Clicking OK on the error message and providing a new name for the table would have caused the Schema Painter to crash. This is now fixed. ================(Build #4219 - Engineering Case #310190)================ The collation info in schema files (.usm), required to sort Unicode characters, was corrupt. The schema files generated by ulview, ulinit or ulxml, all showed the same problem. The effect of this was that Unicode strings with non-ascii characters (ie Unicode values >= 128 ) may have had unexpected results; values may have sorted incorrectly, and upper/lower case conversions may have been incorrect. This has now been corrected. ================(Build #4242 - Engineering Case #315241)================ The Schema Painter was unable to open a user defined XML file that contained a publication with a large number of tables. When the user tried to open this schema file, the Schema Painter failed, returning an error indicating that the publication could not be created because a table did not exist. The table name displayed in the error sometimes contained a full table name, but always contained various garbage characters. This is now fixed. ================(Build #4244 - Engineering Case #316472)================ When using the Schema Painter on Windows 9x, a conversion from usm to xml produced a corrupt xml file that would not then open in the Schema Painter, and could not have been converted back to a usm file. This has now been fixed. ================(Build #4283 - Engineering Case #324932)================ Dropping tables or adding foreign keys could have resulted in an invalid schema. Also the Schema Painter was not properly detecting foreign key cycles, which could have caused problems during synchronizations. MobiLink requires that parent tables be synchronized before child tables and this condition wasn't being guaranteed by the schema created in the Schema Painter. Both of these problems have now been fixed. In order to fix an invalid schema, use the (fixed) ulxml tool or Schema Painter to write the schema out to as an XML file, then reload it back in. The process of reloading it will correct the table order. ================(Build #4323 - Engineering Case #333908)================ Dropping blob columns in the Schema Painter would have resulted in corrupt udb files. This would have caused a crash at the end of synchronization. This has been fixed, but a work around is to take the corrupt usm file, convert it to xml, then convert it back to a usm file again using the ulxml tool.

UltraLite - UltraLite for AppForge MobileVB

================(Build #4224 - Engineering Case #311194)================ When a table was opened with an index, after column objects for that table had been referenced, may have thrown the error SQLE_METHOD_CANNOT_BE_CALLED.This has now been fixed. ================(Build #4253 - Engineering Case #318855)================ If a ULConnection object?s Close method was called before a ULColumn or ULIndexSchema object was released, Visual Basic would have crashed. This would have happened if a ULColumn or ULIndexSchema object was declared globally for instance. This has been fixed. ================(Build #4253 - Engineering Case #318868)================ Attempting to call methods on a ULIndex object would have resulted in incorrect errors. This would have happened if the index was set before the table was opened, and then the table was opened and closed. For example: Set t = Conn.GetTable(?T?) Set idx = t.Schema.GetIndex(?idx?) MsgBox ?Name = ? & CStr(idx.Name) ? this is OK t.Open t.Close MsgBox ?Name = ? & CStr(idx.Name) ? this would fail A similar problem existed with column objects (instead of index objects). This has been fixed, so now the last line of example will succeed. ================(Build #4299 - Engineering Case #327728)================ Attempting to delete all rows matching a certain criteria, assuming there was an appropriate index, may have missed some rows or deleted the wrong rows. For example: t.findBegin(); <specify search criteria using t.set*(...)> t.findFirst(); t.delete(); while( t.findNext() ) { t.delete(); } would have skipped some rows because delete() modified the search criteria. If there were an odd number of rows matching the search criteria, this approach would have deleted rows that did not match the search criteria. Table.delete(), Table.truncate(), and Table.deleteAllRows() have now been changed so as to cancel all edit and search modes.

UltraLite - UltraLite for eMbedded Visual Basic

================(Build #4085 - Engineering Case #301764)================ Coding a loop searching for values using table.FindFirst.. table.FindNext would have failed because table.FindNext would have always returned False, even when the search was found. Workaround: Instead of looping on table.FindNext, check for table EOF Instead of: While table.FindNext ' process match Wend Use: Do table.FindNext If table.EOF Then Exit Do ' process match Loop ================(Build #4090 - Engineering Case #302654)================ ActiveX for Ultralite for CE is now available for the Pocket PC 2002 Emulator (Intel 386 architecture). ================(Build #4230 - Engineering Case #313070)================ The ULPublicationSchema.Mask property was always returning 0. This is now fixed ================(Build #4299 - Engineering Case #327708)================ Attempting to delete all rows matching a certain criteria, assuming there was an appropriate index, may have missed some rows or deleted the wrong rows. For example: t.findBegin(); <specify search criteria using t.set*(...)> t.findFirst(); t.delete(); while( t.findNext() ) { t.delete(); } would have skipped some rows because delete() modified the search criteria. If there were an odd number of rows matching the search criteria, this approach would have deleted rows that did not match the search criteria. Table.delete(), Table.truncate(), and Table.deleteAllRows() have now been changed so as to cancel all edit and search modes. ================(Build #4314 - Engineering Case #332354)================ It was not possible to set a non-primary index column for Lookup or Find. For example, the following statements would have result in the error SQLE_METHOD_CANNOT_BE_CALLED Set table = Connection.Open("MultiIndex_Table") table.Open("Non_Primary_Index") table.Columns("non_primary_index_column").Value = value This error was caused by only checking the primary index for allowable column sets. This has now been fixed to check the index that was used to open the table.